rust_console_game_engine/
lib.rs1#[cfg_attr(target_os = "windows", path = "winconsole.rs")]
2#[cfg_attr(not(target_os = "windows"), path = "noconsole.rs")]
3mod console;
4pub use console::RustConsole;
5
6mod engine;
7pub use engine::RustConsoleGameEngine;
8
9mod sprite;
10pub use sprite::RustConsoleSprite;
11
12#[derive(Copy, Clone)]
13pub struct KeyState {
14 pub pressed: bool,
15 pub released: bool,
16 pub held: bool
17}
18
19pub trait RustConsoleGame {
20 fn name(&self) -> &str;
21 fn setup(&mut self);
22 fn update(&mut self, console: &mut RustConsole, elapsed_time: f32);
23}