game states

This commit is contained in:
2026-09-18 22:38:58 +02:00
parent 9ab3431c63
commit 62c06161e7
+18
View File
@@ -0,0 +1,18 @@
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>();
}
}