susuwatari-game/src/main.rs

21 lines
563 B
Rust

extern crate ghostly;
extern crate piston_window;
use piston_window::*;
fn main() {
let mut window: PistonWindow = WindowSettings::new("Susuwatari Game", [1024, 768])
.exit_on_esc(true)
.resizable(false)
.build()
.unwrap();
let mut game = ghostly::Game::new(&mut window);
while let Some(e) = window.next() {
match e {
Input::Update(upd) => game.on_update(&e, upd, &window),
Input::Render(ren) => game.on_draw(&e, ren, &mut window),
_ => game.on_input(e),
}
}
}