Trait bottomless_pit::Game

source ·
pub trait Game {
    // Required methods
    fn render(&self, render_handle: &mut Renderer);
    fn update(&mut self, engine_handle: &mut Engine);

    // Provided method
    fn on_close(&self) { ... }
}
Expand description

The Trait needed for structs to be used in with the Engine

Required Methods§

source

fn render(&self, render_handle: &mut Renderer)

Rendering code goes here

source

fn update(&mut self, engine_handle: &mut Engine)

updating code goes here

Provided Methods§

source

fn on_close(&self)

Things to do when the window closes

Implementors§