Behaviours
BxSwNode Class Reference

Inherited by BxSwDiverterNode.

Public Types

enum  SolenoidReleaseType { ALWAYS_WHEN_ON = 0, ON_EDGE, ON_RISING_EDGE, ON_FAILING_EDGE }
 Solenoid release type definition. ALWAYS_WHEN_ON means that any ball release if the solenoid is on ON_EDGE means that a ball is released only when the solenoid's state change (from on to off or from off to on) ON_RISING_EDGE means that a ball is released only when the solenoid's state change from off to on ON_FAILING_EDGE means that a ball is released only when the solenoid's state change from on to off More...
 

Public Member Functions

virtual void Update ()
 
bool IsFull ()
 
virtual void InsertBall (BxSwVirtualBall b)
 
virtual BxSwVirtualBall ExitingBall ()
 
virtual bool TryReleaseBall (BxSwVirtualBall b)
 
virtual int OutEdge ()
 
virtual BxSwVirtualBall KickOut ()
 
void SetSolenoidRelease (int solenoidSlot=-1, SolenoidReleaseType type=SolenoidReleaseType.ON_RISING_EDGE)
 tell this node is blocking and released by a solenoid
 

Public Attributes

int m_switchSlot =-1
 Switch slot number activated when a ball enters the subway system.
 
int m_solenoidSlot =-1
 Solenoid slot number to release the ball from this node.
 
int m_maxBalls =1
 maximum number of balls at a time in this node
 
float m_holdTime =0.0f
 time, in seconds for the ball to stay if not constrained
 
List< BxSwVirtualBallm_balls
 balls currently in "stack"
 
List< BxSwEdgem_in
 entering edges
 
List< BxSwEdgem_out
 leaving edges
 
string m_name
 name (automatic naming)
 
Vector3 m_position
 Graphic Representation position.
 
SolenoidReleaseType m_releaseType = SolenoidReleaseType.ON_RISING_EDGE
 release type default
 
BxSwOutput m_output = null
 out kicker
 

Static Public Attributes

static int s_cpt =0
 static counter for automatic naming
 

Protected Attributes

bool m_solState =false
 Solenoid state.
 
bool m_solRelease =true
 Solenoid release flag.
 
AudioClip m_SolRealeaseSound =null
 Solenoid release sound.
 
AudioSource m_audio =null
 Solenoid audio source.
 
GameObject m_audioObj =null
 Solenoid audio source object.
 

Member Enumeration Documentation

Solenoid release type definition. ALWAYS_WHEN_ON means that any ball release if the solenoid is on ON_EDGE means that a ball is released only when the solenoid's state change (from on to off or from off to on) ON_RISING_EDGE means that a ball is released only when the solenoid's state change from off to on ON_FAILING_EDGE means that a ball is released only when the solenoid's state change from on to off

Member Function Documentation

virtual void BxSwNode.InsertBall ( BxSwVirtualBall  b)
virtual
Parameters
bEvent called when a virtual ball enters the node
virtual bool BxSwNode.TryReleaseBall ( BxSwVirtualBall  b)
virtual
Parameters
bEvent called when a virtual ball can quit the node to an out edge

The documentation for this class was generated from the following file: