generated from tipragot/rust
Change of file structure for scenes #38
|
@ -1,13 +1,13 @@
|
|||
//! The main entry point of the game.
|
||||
|
||||
use bevy::prelude::*;
|
||||
use border_wars::scenes::MenusPlugin;
|
||||
use border_wars::scenes::ScenesPlugin;
|
||||
use border_wars::GameState;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_state::<GameState>()
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
|
||||
.add_plugins(MenusPlugin)
|
||||
.add_plugins(ScenesPlugin)
|
||||
.run();
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ use bevy_egui::EguiPlugin;
|
|||
pub mod menu;
|
||||
|
||||
/// The plugin for all menus.
|
||||
pub struct MenusPlugin;
|
||||
pub struct ScenesPlugin;
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
tipragot
commented
Rename this to ScenePlugin Rename this to ScenePlugin
|
||||
|
||||
impl Plugin for MenusPlugin {
|
||||
impl Plugin for ScenesPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_plugins(EguiPlugin).add_plugins(menu::MenuPlugin);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue
Add it in the ScenesPlugin instead.