-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e98929e
commit 94698d7
Showing
9 changed files
with
43 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/target | ||
.cargo/config.toml | ||
/wasm |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Disable console on Windows for non-dev builds. | ||
#![cfg_attr(not(feature = "dev"), windows_subsystem = "windows")] | ||
|
||
mod loading; | ||
mod ready; | ||
mod ui; | ||
|
||
use bevy::prelude::*; | ||
|
||
pub struct GamePlugin; | ||
|
||
impl Plugin for GamePlugin { | ||
fn build(&self, app: &mut AppBuilder) { | ||
// State setup | ||
app.init_state::<AppState>(); | ||
// Add state scoped entities for UI cleanup | ||
app.enable_state_scoped_entities::<AppState>(); | ||
// Print state transitions in dev builds | ||
#[cfg(feature = "dev")] | ||
app.add_systems(Update, bevy::dev_tools::states::log_transitions::<AppState>); | ||
|
||
// Sub plugins | ||
app.add_plugins((loading::plugin, ready::plugin)); | ||
|
||
// Other | ||
app.add_plugins(ui::plugin); | ||
|
||
// For a larger UI example visit: https://github.com/MiniaczQ/bevy-substate-project | ||
} | ||
} | ||
|
||
/// Root state of the application. | ||
#[derive(States, Debug, PartialEq, Eq, Hash, Clone, Default)] | ||
enum AppState { | ||
#[default] | ||
Loading, | ||
Ready, | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.