[][src]Trait amethyst::State

pub trait State<T, E: Send + Sync + 'static> {
    fn on_start(&mut self, _data: StateData<T>) { ... }
fn on_stop(&mut self, _data: StateData<T>) { ... }
fn on_pause(&mut self, _data: StateData<T>) { ... }
fn on_resume(&mut self, _data: StateData<T>) { ... }
fn handle_event(&mut self, _data: StateData<T>, _event: E) -> Trans<T, E> { ... }
fn fixed_update(&mut self, _data: StateData<T>) -> Trans<T, E> { ... }
fn update(&mut self, _data: StateData<T>) -> Trans<T, E> { ... }
fn shadow_fixed_update(&mut self, _data: StateData<T>) { ... }
fn shadow_update(&mut self, _data: StateData<T>) { ... } }

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), if this is the active state.

Executed on every frame immediately, as fast as the engine will allow (taking into account the frame rate limit), if this is the active state.

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

impl<T: EmptyState> State<(), StateEvent> for T
[src]

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.

impl<T: SimpleState> State<GameData<'static, 'static>, StateEvent> for T
[src]

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.