use gamestates and assetloader
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
mod backpack_ui;
|
||||
|
||||
use crate::heads_ui::HEAD_COUNT;
|
||||
use crate::{GameState, heads_ui::HEAD_COUNT};
|
||||
use bevy::prelude::*;
|
||||
|
||||
pub use backpack_ui::BackpackAction;
|
||||
@@ -28,7 +28,7 @@ pub struct BackbackSwapEvent(pub usize);
|
||||
pub fn plugin(app: &mut App) {
|
||||
app.add_plugins(backpack_ui::plugin);
|
||||
|
||||
app.add_systems(Startup, setup);
|
||||
app.add_systems(OnEnter(GameState::Playing), setup);
|
||||
}
|
||||
|
||||
fn setup(mut commands: Commands) {
|
||||
|
||||
Reference in New Issue
Block a user