micro_games_kit::game

Trait GameObject

Source
pub trait GameObject {
    // Provided methods
    fn activate(&mut self, context: &mut GameContext<'_>) { ... }
    fn deactivate(&mut self, context: &mut GameContext<'_>) { ... }
    fn process(&mut self, context: &mut GameContext<'_>, delta_time: f32) { ... }
    fn draw(&mut self, context: &mut GameContext<'_>) { ... }
}

Provided Methods§

Source

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

Source

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

Source

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

Source

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

Implementors§

Source§

impl<State: GameObject> GameObject for Character<State>