mgd2-tram-championships/src/main.rs

36 lines
794 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::*;
2025-06-16 17:21:13 +02:00
use bevy_skein::SkeinPlugin;
use bevy_ui_text_input::TextInputPlugin;
2025-05-14 13:28:18 +02:00
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()
2025-06-16 17:21:13 +02:00
.register_type::<TPCTarget>()
.add_systems(Startup, camera::setup)
.add_plugins((DefaultPlugins, TextInputPlugin))
2025-06-16 17:21:13 +02:00
.add_plugins((game::plugin, menus::plugin, debugging::plugin))
.add_plugins(SkeinPlugin::default())
2025-05-21 15:56:23 +02:00
.init_state::<AppState>()
2025-05-23 19:20:57 +02:00
.register_type::<AppState>()
2025-05-14 13:28:18 +02:00
.run();
}
2025-06-16 17:21:13 +02:00
#[derive(Debug, Reflect, Component)]
#[reflect(Component)]
struct TPCTarget;