Behaviours
BxSwManager Class Reference

Inherits MonoBehaviour.

Inherited by BxSwVisualManager.

Public Member Functions

virtual void Build ()
 
void DoStep (float elapsed=0.01f)
 Simulate one step (in seconds) of the subway sytem's virtual ball displacement.
 
BxSwNode FindNode (string s)
 
virtual BxSwNode AddEntrance (string kickerIn, int switchSlot=-1, bool destroyBall=true, string soundIn="")
 Add an entrance node linked to an input kicker.
 
virtual BxSwNode AddExit (string kickerOut, int solenoidSlot=-1, float releaseTime=0.25f, BxSwNode.SolenoidReleaseType releaseType=BxSwNode.SolenoidReleaseType.ON_RISING_EDGE, string soundOut="")
 Add an entrance node linked to an output kicker.
 
virtual BxSwNode AddNode (string name="", float holdTime=0.0f, int maxBalls=1)
 Add a standard node to the subway system.
 
virtual T AddNode< T > (string name="", float holdTime=0.0f, int maxBalls=1)
 
virtual BxSwEdge LinkNodes (BxSwNode n1, BxSwNode n2, float crossingTime=1.0f, float length=-1.0f)
 Link two node with a new edge (if length < 0, autocomputed from nodes posiitons)
 
virtual BxSwNode InitBallStack (string inKickerName, string outKickerName, int entrySw=-1, int sw1=-1, int sw2=-1, int sw3=-1, int sw4=-1, int sw5=-1, int sw6=-1, int sw7=-1, int solIn=-1, int solOut=-1, float crossingTime=1.0f)
 
virtual void ReportNewBall (BxSwVirtualBall b)
 Called by internal node to report a virtual ball creation.
 
virtual void ReportBallExit (BxSwVirtualBall b)
 Called by internal node to report a destroyed virtual ball.
 
void AddBallOnNode (BxSwNode n)
 Function to add a ball on startup in a given node...
 
void AddBallOnEdgeSwitch (BxSwEdge e, BxSwEdgeSwitch sw)
 Function to add a ball on startup in a given node...
 
void ResetSwitches ()
 Function to reset the switches according to current static state.
 
virtual void DestroyBalls ()
 Function to Destroy all subway virtual balls and their references. More...
 

Protected Attributes

List< BxSwNodem_nodes = new List<BxSwNode>()
 Nodes in the subway System.
 
List< BxSwEdgem_edges = new List<BxSwEdge>()
 Edges in the subway System.
 
List< BxSwVirtualBallm_balls = new List<BxSwVirtualBall>()
 Balls in the subway System.
 
bool m_built = false
 build flag
 

Member Function Documentation

virtual void BxSwManager.DestroyBalls ( )
virtual

Function to Destroy all subway virtual balls and their references.

< Balls in the subway System

Reimplemented in BxSwVisualManager.

virtual BxSwNode BxSwManager.InitBallStack ( string  inKickerName,
string  outKickerName,
int  entrySw = -1,
int  sw1 = -1,
int  sw2 = -1,
int  sw3 = -1,
int  sw4 = -1,
int  sw5 = -1,
int  sw6 = -1,
int  sw7 = -1,
int  solIn = -1,
int  solOut = -1,
float  crossingTime = 1.0f 
)
virtual

Utility function to create a ballstack between inKicker and outKicker. inKickerName: name of the input kicker outKickerName: name of the output kicker entrySw is triggered when ball is entering inKicker (<=0 for no switch) sw1 is triggered when ball is in outKicker (<=0 for no switch) sw2-sw7 are switches in stack (<=0 for no switch) solIn: solenoid releasing ball from inKicker to the ball stack (-1 = no solenoid) solOut: solenoid releasing ball from outKicker (-1 = no solenoid) crossingTime is the time for a ball to cross from inKicker to outKicker Return the input node


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