19 lines
335 B
Rust
19 lines
335 B
Rust
use bevy::prelude::*;
|
|
|
|
#[derive(States, Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
|
pub enum GameState {
|
|
#[default]
|
|
MainMenu,
|
|
InGame,
|
|
SettingsMenu,
|
|
GameOver,
|
|
}
|
|
|
|
pub struct GameStatePlugin;
|
|
|
|
impl Plugin for GameStatePlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.init_state::<GameState>();
|
|
}
|
|
}
|