Trait shadiertoy::Game[][src]

pub trait Game {
    fn new(_: &mut Window) -> Self;
fn draw(&mut self, _: &mut Window); fn event(&mut self, &mut Window, Event) { ... }
fn run()
    where
        Self: Sized
, { ... } }

A game, which is hopefully what you're making.

Required Methods

Initialize.

Draw a frame.

Call Window::draw inside this function.

Provided Methods

Handle an event.

All input handling goes here.

Run the game!

Implementors