mgd2-tram-championships/src/main.rs

31 lines
627 B
Rust
Raw Normal View History

2025-05-21 20:48:21 +02:00
#![feature(iter_collect_into)]
2025-05-14 13:28:18 +02:00
use bevy::prelude::*;
mod camera;
mod cleanup;
2025-05-21 15:56:23 +02:00
mod debugging;
mod game;
2025-05-21 20:48:21 +02:00
mod menus;
2025-05-21 15:56:23 +02:00
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash, Reflect)]
#[allow(unused)]
enum AppState {
#[default]
2025-05-23 19:20:57 +02:00
Menus,
Ingame,
PostGame,
}
2025-05-14 13:28:18 +02:00
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, camera::setup)
2025-05-21 15:56:23 +02:00
.add_plugins(game::plugin)
2025-05-23 19:20:57 +02:00
.add_plugins(menus::plugin)
2025-05-21 15:56:23 +02:00
.init_state::<AppState>()
.add_plugins(debugging::plugin)
2025-05-23 19:20:57 +02:00
.register_type::<AppState>()
// .insert_state(AppState::Ingame)
2025-05-14 13:28:18 +02:00
.run();
}