use player spawn oneshot

This commit is contained in:
TudbuT 2024-11-23 18:33:27 +01:00
parent 1a0100b596
commit dea1bdcf03
3 changed files with 12 additions and 9 deletions

View file

@ -1,7 +1,7 @@
use bevy::prelude::*;
use bevy_rapier2d::prelude::*;
use player::player_plugin;
use scene::{scene_plugin, PlayerSpawnEvent};
use scene::{scene_plugin, PlayerCoords};
use crate::AppState;
@ -10,9 +10,8 @@ mod scene;
mod set;
pub const WORLD_DEPTH: f32 = 0.5;
pub const PLAYER_DEPTH: f32 = 0.5;
pub fn game_plugin(app: &mut App) {
(app)
.add_event::<PlayerSpawnEvent>()
.add_plugins((player_plugin, scene_plugin));
app.add_plugins((player_plugin, scene_plugin));
}