mirror of
https://codeberg.org/schrottkatze/mgd2-tram-championships.git
synced 2025-07-03 01:47:38 +00:00
36 lines
818 B
Rust
36 lines
818 B
Rust
#![feature(iter_collect_into)]
|
|
use bevy::prelude::*;
|
|
use bevy_skein::SkeinPlugin;
|
|
use bevy_ui_text_input::TextInputPlugin;
|
|
use clap::ValueEnum;
|
|
|
|
mod camera;
|
|
mod cleanup;
|
|
mod debug;
|
|
mod game;
|
|
mod menus;
|
|
|
|
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash, Reflect, ValueEnum)]
|
|
#[allow(unused)]
|
|
enum AppState {
|
|
#[default]
|
|
Menus,
|
|
Ingame,
|
|
PostGame,
|
|
}
|
|
|
|
fn main() {
|
|
App::new()
|
|
.register_type::<TPCTarget>()
|
|
.add_systems(Startup, camera::setup)
|
|
.add_plugins((DefaultPlugins, TextInputPlugin))
|
|
.add_plugins((game::plugin, menus::plugin, debug::plugin))
|
|
.add_plugins(SkeinPlugin::default())
|
|
.init_state::<AppState>()
|
|
.register_type::<AppState>()
|
|
.run();
|
|
}
|
|
|
|
#[derive(Debug, Reflect, Component)]
|
|
#[reflect(Component)]
|
|
struct TPCTarget;
|