turtlegame/src/main.rs
2024-07-05 23:12:09 +02:00

35 lines
646 B
Rust

mod game;
use comfy::*;
const GAME_NAME: &str = "Powercreep";
#[derive(Debug)]
struct State {}
impl GameLoop for State {
fn new(_c: &mut EngineState) -> Self {
State {}
}
fn update(&mut self, engine: &mut EngineContext) {
game::update(self, engine);
game::draw(self, engine);
}
}
fn config(config: GameConfig) -> GameConfig {
config
}
async fn run() {
init_game_config(GAME_NAME.to_string(), env!("CARGO_PKG_VERSION"), config);
let mut engine = EngineState::new();
let game = State::new(&mut engine);
run_comfy_main_async(game, engine).await;
}
fn main() {
//my_env_logger_style::just_log();
pollster::block_on(run());
}