Finite State Machine Helper  1.0
Public Member Functions | List of all members
FSMHelper.FSMStateMachine Class Reference

The state machine You can instantiate this directly, or you can make a class inheriting this. More...

Public Member Functions

 FSMStateMachine ()
 Constructor for the state machine. More...
 
virtual void SetupDefinition (ref FSMStateType stateType, ref List< System.Type > children)
 Sets up the first layer of the state machine. Determines if it has children, and if the state is an OR vs AND state. More...
 
virtual void StartSM ()
 Calling this will enter the state machine's initial state(s) More...
 
virtual void UpdateSM ()
 Calling this will trigger Update() on all active states in the state machine More...
 
virtual void StopSM ()
 Calling this will trigger Exit() on all active states in the state machine. More...
 
void BroadcastMessage (object[] args)
 Broadcasts the specified arguments to all active states in the state machine. More...
 
bool IsInState (System.Type state)
 Checks if the statemachine has an active state of the specified class More...
 
void PrintActiveStateTree ()
 Prints to the debug log, a tree of all the currently active states More...
 

Detailed Description

The state machine You can instantiate this directly, or you can make a class inheriting this.

Constructor & Destructor Documentation

FSMHelper.FSMStateMachine.FSMStateMachine ( )

Constructor for the state machine.

Member Function Documentation

void FSMHelper.FSMStateMachine.BroadcastMessage ( object[]  args)

Broadcasts the specified arguments to all active states in the state machine.

Parameters
argsThe arguments to send in the broadcast
bool FSMHelper.FSMStateMachine.IsInState ( System.Type  state)

Checks if the statemachine has an active state of the specified class

Parameters
stateThe state to check for.
Returns
Returns if the specified state is active in the statemachine or not.
void FSMHelper.FSMStateMachine.PrintActiveStateTree ( )

Prints to the debug log, a tree of all the currently active states

virtual void FSMHelper.FSMStateMachine.SetupDefinition ( ref FSMStateType  stateType,
ref List< System.Type >  children 
)
virtual

Sets up the first layer of the state machine. Determines if it has children, and if the state is an OR vs AND state.

Parameters
stateTypeStates of type OR means that only one of its children is active at any one time. Type AND means all its children states are active
childrenThe list of child states for this state. If the state type is OR, the first child in this list will be the initial active state.
virtual void FSMHelper.FSMStateMachine.StartSM ( )
virtual

Calling this will enter the state machine's initial state(s)

virtual void FSMHelper.FSMStateMachine.StopSM ( )
virtual

Calling this will trigger Exit() on all active states in the state machine.

virtual void FSMHelper.FSMStateMachine.UpdateSM ( )
virtual

Calling this will trigger Update() on all active states in the state machine


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