Change of file structure for scenes #38

Merged
tipragot merged 11 commits from restruct-menus into main 2024-02-10 17:26:09 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit c8a1902d4c - Show all commits

View file

@ -1,13 +1,13 @@
//! The main entry point of the game. //! The main entry point of the game.
use bevy::prelude::*; use bevy::prelude::*;
use border_wars::scenes::MenusPlugin; use border_wars::scenes::ScenesPlugin;
use border_wars::GameState; use border_wars::GameState;
fn main() { fn main() {
App::new() App::new()
.add_plugins(DefaultPlugins) .add_plugins(DefaultPlugins)
.add_state::<GameState>() .add_state::<GameState>()
CoCo_Sol marked this conversation as resolved Outdated

Add it in the ScenesPlugin instead.

Add it in the ScenesPlugin instead.
.add_plugins(MenusPlugin) .add_plugins(ScenesPlugin)
.run(); .run();
} }

View file

@ -6,9 +6,9 @@ use bevy_egui::EguiPlugin;
pub mod menu; pub mod menu;
/// The plugin for all menus. /// The plugin for all menus.
pub struct MenusPlugin; pub struct ScenesPlugin;
CoCo_Sol marked this conversation as resolved Outdated

Rename this to ScenePlugin

Rename this to ScenePlugin
impl Plugin for MenusPlugin { impl Plugin for ScenesPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_plugins(EguiPlugin).add_plugins(menu::MenuPlugin); app.add_plugins(EguiPlugin).add_plugins(menu::MenuPlugin);
} }