Trait crankstart::Game

source ·
pub trait Game {
    // Required method
    fn update(&mut self, playdate: &mut Playdate) -> Result<(), Error>;

    // Provided methods
    fn update_sprite(
        &mut self,
        sprite: &mut Sprite,
        playdate: &mut Playdate
    ) -> Result<(), Error> { ... }
    fn draw_sprite(
        &self,
        sprite: &Sprite,
        bounds: &PDRect,
        draw_rect: &PDRect,
        playdate: &Playdate
    ) -> Result<(), Error> { ... }
    fn draw_fps(&self) -> bool { ... }
}

Required Methods§

source

fn update(&mut self, playdate: &mut Playdate) -> Result<(), Error>

Provided Methods§

source

fn update_sprite( &mut self, sprite: &mut Sprite, playdate: &mut Playdate ) -> Result<(), Error>

source

fn draw_sprite( &self, sprite: &Sprite, bounds: &PDRect, draw_rect: &PDRect, playdate: &Playdate ) -> Result<(), Error>

source

fn draw_fps(&self) -> bool

Implementors§