StateMachine that when the current state is finished it will automatically transition to the next registered state.
More...
|
| AutoStateMachine (T defaultState, params AutoStateInformation< T >[] transitionInformation) |
|
void | DoAction () |
| Trigger the action corresponding to the current state. If the action returns true, then the next state is transitioned. It is important to call this method every update tick as it uses the Time.deltaTime to keep track of any timing things. This is actually bad and should be fixed so that dependencies of this class don't have to know that this should always be called. More...
|
|
bool | ChangeState (T newState) |
|
StateMachine that when the current state is finished it will automatically transition to the next registered state.
StateMachine used to organize how/when specific actions should be done.
◆ AutoStateMachine()
- Parameters
-
defaultState | First state after being created. |
transitionInformation | All the states in the state machine with all their transitions and actions. |
◆ ChangeState()
- Parameters
-
newState | New state that should be changed to. |
- Returns
- True if the state was changed. False if the transition to the state is not allowed.
◆ DoAction()
Trigger the action corresponding to the current state. If the action returns true, then the next state is transitioned. It is important to call this method every update tick as it uses the Time.deltaTime to keep track of any timing things. This is actually bad and should be fixed so that dependencies of this class don't have to know that this should always be called.
The documentation for this class was generated from the following file: