generated from tipragot/rust
Change of file structure for scenes #38
|
@ -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>()
|
||||||
.add_plugins(MenusPlugin)
|
.add_plugins(ScenesPlugin)
|
||||||
.run();
|
.run();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue