Struct amethyst_engine::StateMachine
[−]
[src]
pub struct StateMachine { /* fields omitted */ }
A simple stack-based state machine (pushdown automaton).
Methods
impl StateMachine
[src]
fn new<T: 'static>(initial_state: T) -> StateMachine where
T: State,
T: State,
fn is_running(&self) -> bool
Checks whether the state machine is running.
fn start(&mut self)
fn handle_events(&mut self, events: &[i32])
Passes a vector of events to the active state to handle.
fn fixed_update(&mut self, delta_time: Duration)
Updates the currently active state at a steady, fixed interval.
fn update(&mut self, delta_time: Duration)
Updates the currently active state immediately.