game states
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user