Enum game_engine_core::StateTransition [−][src]
pub enum StateTransition<S> { None, Pop, Push(Box<dyn State<S> + 'static, Global>), Switch(Box<dyn State<S> + 'static, Global>), Quit, }
Expand description
A transition from one state to the other.
Generics
- S: State data, the data that is sent to states for them to do their operations.
Variants
Stay in the current state.
End the current state and go to the previous state on the stack, if any. If we Pop the last state, the state machine exits.
Push a new state on the stack.
Pop all states on the stack and insert this one.
Pop all states and exit the state machine.