micro_games_kit::game

Trait GameState

Source
pub trait GameState {
    // Provided methods
    fn enter(&mut self, context: GameContext<'_>) { ... }
    fn exit(&mut self, context: GameContext<'_>) { ... }
    fn update(&mut self, context: GameContext<'_>, delta_time: f32) { ... }
    fn fixed_update(&mut self, context: GameContext<'_>, delta_time: f32) { ... }
    fn draw(&mut self, context: GameContext<'_>) { ... }
    fn draw_gui(&mut self, context: GameContext<'_>) { ... }
}

Provided Methods§

Source

fn enter(&mut self, context: GameContext<'_>)

Source

fn exit(&mut self, context: GameContext<'_>)

Source

fn update(&mut self, context: GameContext<'_>, delta_time: f32)

Source

fn fixed_update(&mut self, context: GameContext<'_>, delta_time: f32)

Source

fn draw(&mut self, context: GameContext<'_>)

Source

fn draw_gui(&mut self, context: GameContext<'_>)

Implementors§