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;
|
2025-06-17 20:50:46 +02:00
|
|
|
use bevy_ui_text_input::TextInputPlugin;
|
2025-05-14 13:28:18 +02:00
|
|
|
|
2025-05-14 23:14:41 +02:00
|
|
|
mod camera;
|
|
|
|
mod cleanup;
|
2025-05-21 15:56:23 +02:00
|
|
|
mod debugging;
|
2025-05-14 23:14:41 +02:00
|
|
|
mod game;
|
2025-05-21 20:48:21 +02:00
|
|
|
mod menus;
|
2025-05-14 23:14:41 +02:00
|
|
|
|
2025-05-21 15:56:23 +02:00
|
|
|
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash, Reflect)]
|
2025-05-14 23:14:41 +02:00
|
|
|
#[allow(unused)]
|
|
|
|
enum AppState {
|
|
|
|
#[default]
|
2025-05-23 19:20:57 +02:00
|
|
|
Menus,
|
2025-05-14 23:14:41 +02:00
|
|
|
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>()
|
2025-05-14 23:14:41 +02:00
|
|
|
.add_systems(Startup, camera::setup)
|
2025-06-17 20:50:46 +02:00
|
|
|
.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;
|