[][src]Trait amethyst::prelude::SimpleState

pub trait SimpleState {
    fn on_start(&mut self, _data: StateData<GameData>) { ... }
fn on_stop(&mut self, _data: StateData<GameData>) { ... }
fn on_pause(&mut self, _data: StateData<GameData>) { ... }
fn on_resume(&mut self, _data: StateData<GameData>) { ... }
fn handle_event(
        &mut self,
        _data: StateData<GameData>,
        event: StateEvent
    ) -> SimpleTrans { ... }
fn fixed_update(&mut self, _data: StateData<GameData>) -> SimpleTrans { ... }
fn update(&mut self, _data: &mut StateData<GameData>) -> SimpleTrans { ... }
fn shadow_fixed_update(&mut self, _data: StateData<GameData>) { ... }
fn shadow_update(&mut self, _data: StateData<GameData>) { ... } }

A simple State trait. It contains GameData as its StateData and no custom StateEvent.

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 (taking into account the frame rate limit).

Executed repeatedly at stable, predictable intervals (1/60th of a second by default), even when this is not the active state, as long as this state is on the StateMachine's state-stack.

Executed on every frame immediately, as fast as the engine will allow (taking into account the frame rate limit), even when this is not the active state, as long as this state is on the StateMachine's state-stack.

Implementors