Finite state machine class to handle state transitions and updates.
void SetStateUpdate(int state, FuncPtr funcPtr=null)
delegate void FuncPtr()
Define a delegate that takes in 0 arguments and returns void.
void ChangeState(int nextState)
void SetStateExit(int state, FuncPtr funcPtr=null)
FuncPtr[] stateLateUpdates
The late update callback function of states.
FuncPtr[] stateUpdates
The update callback function of states.
FuncPtr[] stateExits
The exit callback function of states.
void SetStateEntry(int state, FuncPtr funcPtr=null)
FuncPtr[] stateEntries
The entry callback function of states.
void SetStateLateUpdate(int state, FuncPtr funcPtr=null)
FiniteStateMachine(int numStates)