Trait amethyst_engine::State [] [src]

pub trait State {
    fn on_start(&mut self) { ... }
    fn on_stop(&mut self) { ... }
    fn on_pause(&mut self) { ... }
    fn on_resume(&mut self) { ... }
    fn handle_events(&mut self, _events: &[i32]) { ... }
    fn fixed_update(&mut self, _delta: Duration) -> Trans { ... }
    fn update(&mut self, _delta: Duration) -> Trans { ... }
}

A trait which defines game states that can be used by the state machine.

Provided Methods

Executed when the game state begins.

Executed when the game state exits.

Executed when a different game state is pushed onto the stack.

Executed when the application returns to this game state once again.

Executed on every frame before updating, for use in reacting to events.

Executed repeatedly at stable, predictable intervals (1/60th of a second by default).

Executed on every frame immediately, as fast as the engine will allow.

Implementors