add player spawn event
This commit is contained in:
parent
44ff56592e
commit
a24e6e39a6
2 changed files with 56 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
|||
use bevy::prelude::*;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
use player::player_plugin;
|
||||
use scene::scene_plugin;
|
||||
use scene::{scene_plugin, PlayerSpawnEvent};
|
||||
|
||||
use crate::AppState;
|
||||
|
||||
|
@ -12,5 +12,7 @@ mod set;
|
|||
pub const WORLD_DEPTH: f32 = 0.5;
|
||||
|
||||
pub fn game_plugin(app: &mut App) {
|
||||
app.add_plugins((player_plugin, scene_plugin));
|
||||
(app)
|
||||
.add_event::<PlayerSpawnEvent>()
|
||||
.add_plugins((player_plugin, scene_plugin));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue