mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
31 lines
712 B
Rust
31 lines
712 B
Rust
use bevy::{ecs::system::RunSystemOnce, prelude::*};
|
|
|
|
use super::systems::{despawn::despawn_players, respawn::respawn_player, spawn::spawn_player};
|
|
|
|
#[derive(Debug, Reflect)]
|
|
pub struct SpawnPlayer;
|
|
|
|
#[derive(Debug, Reflect)]
|
|
pub struct RespawnPlayer;
|
|
|
|
#[derive(Debug, Reflect)]
|
|
pub struct DespawnPlayer;
|
|
|
|
impl Command for SpawnPlayer {
|
|
fn apply(self, world: &mut World) {
|
|
let _ = world.run_system_once(spawn_player);
|
|
}
|
|
}
|
|
|
|
impl Command for RespawnPlayer {
|
|
fn apply(self, world: &mut World) {
|
|
let _ = world.run_system_once(respawn_player);
|
|
}
|
|
}
|
|
|
|
impl Command for DespawnPlayer {
|
|
fn apply(self, world: &mut World) {
|
|
let _ = world.run_system_once(despawn_players);
|
|
}
|
|
}
|