Trait amethyst::State [] [src]

pub trait State {
    fn on_start(&mut self, _eng: &mut World) { ... }
fn on_stop(&mut self, _eng: &mut World) { ... }
fn on_pause(&mut self, _eng: &mut World) { ... }
fn on_resume(&mut self, _eng: &mut World) { ... }
fn handle_event(&mut self, _eng: &mut World, _event: Event) -> Trans { ... }
fn fixed_update(&mut self, _eng: &mut World) -> Trans { ... }
fn update(&mut self, _eng: &mut World) -> 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