You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.1 KiB
Rust
56 lines
1.1 KiB
Rust
mod animation;
|
|
mod audio;
|
|
mod boot;
|
|
mod deck;
|
|
mod menu;
|
|
mod play;
|
|
mod setup;
|
|
mod view;
|
|
|
|
#[cfg(debug_assertions)]
|
|
mod debug;
|
|
|
|
use bevy::prelude::*;
|
|
|
|
fn main() {
|
|
let primary_window = Some(Window {
|
|
// web: fill the window
|
|
fit_canvas_to_parent: true,
|
|
..default()
|
|
});
|
|
App::new()
|
|
.add_plugins(
|
|
DefaultPlugins
|
|
.set(ImagePlugin::default_nearest())
|
|
.set(WindowPlugin {
|
|
primary_window,
|
|
..default()
|
|
}),
|
|
)
|
|
.add_plugins((
|
|
animation::AnimationPlugin,
|
|
audio::AudioPlugin,
|
|
boot::BootPlugin,
|
|
menu::MenuPlugin,
|
|
play::PlayPlugin,
|
|
setup::SetupPlugin,
|
|
view::ViewPlugin,
|
|
deck::DeckPlugin,
|
|
{
|
|
#[cfg(debug_assertions)]
|
|
debug::DebugPlugin
|
|
},
|
|
))
|
|
.init_state::<GameState>()
|
|
.run();
|
|
}
|
|
|
|
#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash)]
|
|
pub(crate) enum GameState {
|
|
#[default]
|
|
Boot,
|
|
Setup,
|
|
NewGame,
|
|
Main,
|
|
}
|