Crate game_state_machine

Crate game_state_machine 

Source
Expand description

A generic stack-based state machine. This state machine contains a stack of states and handles transitions between them. StateTransition happen based on the return value of the currently running state’s functions. Only one state can run at once.

Structs§

StateMachine
A state machine that holds the stack of states and performs transitions between states. It can be created using

Enums§

StateTransition
A transition from one state to the other.

Traits§

State
Trait that states must implement.