diff --git a/game/src/lib.rs b/game/src/lib.rs index 6ae6e9a..68d17de 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -8,7 +8,7 @@ pub mod main_menu; pub mod settings_page; #[derive(Default)] -pub struct BasePlugin(GameState); +pub struct BasePlugin(GameState, PlayType); impl Plugin for BasePlugin { fn build(&self, app: &mut bevy::prelude::App) { app.add_state::() @@ -25,8 +25,8 @@ impl Plugin for BasePlugin { } impl BasePlugin { - pub fn new(init_state: GameState) -> Self { - Self(init_state) + pub fn new(init_state: GameState, play: PlayType) -> Self { + Self(init_state, play) } } diff --git a/game/src/main.rs b/game/src/main.rs index 96ebe85..8b8eae8 100644 --- a/game/src/main.rs +++ b/game/src/main.rs @@ -8,7 +8,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - BasePlugin::new(GameState::MainMenu), + BasePlugin::new(GameState::MainMenu, PlayType::None), MainMenuPlugin, SettingsPlugin, InGamePlugin, diff --git a/game_server/src/main.rs b/game_server/src/main.rs index 4b9c074..f3745c4 100644 --- a/game_server/src/main.rs +++ b/game_server/src/main.rs @@ -6,7 +6,7 @@ fn main() { App::new() .add_plugins(( DefaultPlugins, - BasePlugin::new(GameState::MainMenu), + BasePlugin::new(GameState::InGame, PlayType::Server), InGamePlugin, )) .run();