aboutsummaryrefslogtreecommitdiff
path: root/src/events.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-12-24 00:54:31 -0500
committerLibravatar Silas Bartha <silas@exvacuum.dev>2024-12-24 00:54:31 -0500
commita1e9304dc31980703446bdb33246e314bafd3b15 (patch)
tree47c9dd32398a6d84050f39fac17d52d0a5d9ad4e /src/events.rs
parentf3a7c2139cb3f9074d28dd99fa1bbd10d752547e (diff)
Switched to bevy_mod_scripting, bevy 0.15 updatev0.4.0
Diffstat (limited to 'src/events.rs')
-rw-r--r--src/events.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/events.rs b/src/events.rs
index 2fa7f81..7932a67 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -17,17 +17,18 @@ pub enum DirworldNavigationEvent {
},
}
+/// Event called when leaving a room
#[derive(Debug, Event, Deref, DerefMut, Clone)]
pub struct DirworldLeaveRoom(pub PathBuf);
+/// Event called when entering a room
#[derive(Debug, Event, Deref, DerefMut, Clone)]
pub struct DirworldEnterRoom(pub PathBuf);
+/// Event called when changing the world root
#[derive(Debug, Event, Deref, DerefMut, Clone)]
pub struct DirworldChangeRoot(pub PathBuf);
-#[derive(Event)]
-pub struct DirworldSpawn {
- pub entity: Entity,
- pub data: Option<Vec<u8>>,
-}
+/// Event called to spawn a dirworld entities
+#[derive(Event, Debug, Deref, DerefMut, Clone, Copy)]
+pub struct DirworldSpawn(pub Entity);