DoopelPonger
Public Member Functions | List of all members
StateMachine< T > Class Template Reference

Public Member Functions

 StateMachine (T defaultState, params StateInformation< T >[] transitionInformation)
 
void DoAction ()
 Trigger the action corresponding to the current state. More...
 
bool ChangeState (T newState)
 

Constructor & Destructor Documentation

◆ StateMachine()

StateMachine< T >.StateMachine ( defaultState,
params StateInformation< T > []  transitionInformation 
)
Parameters
defaultStateFirst state after being created.
transitionInformationAll the states in the state machine with all their transitions and actions.

Member Function Documentation

◆ ChangeState()

bool StateMachine< T >.ChangeState ( newState)
Parameters
newStateNew state that should be changed to.
Returns
True if the state was changed. False if the transition to the state is not allowed.

◆ DoAction()

void StateMachine< T >.DoAction ( )

Trigger the action corresponding to the current state.


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