diff options
| author | HampusM <hampus@hampusmat.com> | 2024-12-09 18:16:50 +0100 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2024-12-09 18:16:50 +0100 | 
| commit | a318a32eba91cacd71c8f0cb09b49a10d12e96ca (patch) | |
| tree | a76848818496a0e22c0f5f061c33ed89ab944999 /ecs/src/event | |
| parent | 3553a24c86791f6f4501e3d19fb85f267435cf70 (diff) | |
feat(ecs): add action to despawn entity
Diffstat (limited to 'ecs/src/event')
| -rw-r--r-- | ecs/src/event/component.rs | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/ecs/src/event/component.rs b/ecs/src/event/component.rs index 5b40c39..b4edffc 100644 --- a/ecs/src/event/component.rs +++ b/ecs/src/event/component.rs @@ -41,7 +41,9 @@ where      }  } -/// Event emitted when a `ComponentT` component is removed from a entity. +/// Event emitted when: +/// a) A `ComponentT` component is removed from a entity. +/// b) A entity with component `ComponentT` is despawned.  #[derive(Clone, Component)]  pub struct Removed<ComponentT>  where @@ -72,3 +74,11 @@ where          Self { _pd: PhantomData }      }  } + +/// Specifies a kind of component event UID. +#[derive(Debug, Clone, Copy)] +#[non_exhaustive] +pub enum Kind +{ +    Removed, +}  | 
