summaryrefslogtreecommitdiff
path: root/ecs/src/system/observer.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-04-29 17:19:34 +0200
committerHampusM <hampus@hampusmat.com>2026-04-30 16:53:56 +0200
commitbf86fdb20c1b983ec12352f51087b65baf196147 (patch)
treebfa53d79ed577c109ae846fcd22f8229da980111 /ecs/src/system/observer.rs
parent6c80b750e09f1996c56b45769937ca5a5d736bd8 (diff)
refactor(ecs): add ext trait for component event EventMatch fns
Diffstat (limited to 'ecs/src/system/observer.rs')
-rw-r--r--ecs/src/system/observer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/src/system/observer.rs b/ecs/src/system/observer.rs
index 236420c..0472614 100644
--- a/ecs/src/system/observer.rs
+++ b/ecs/src/system/observer.rs
@@ -138,14 +138,14 @@ pub struct EventMatch<'world, ObservedT: Observed>
impl<'world, ObservedT: Observed> EventMatch<'world, ObservedT>
{
#[must_use]
- pub fn id(&self) -> Uid
+ pub fn entity_id(&self) -> Uid
{
self.id
}
/// Attempts to get the entity with the id of this match.
#[must_use]
- pub fn get_entity(&self) -> Option<EntityHandle<'world>>
+ pub fn try_get_entity(&self) -> Option<EntityHandle<'world>>
{
self.world.get_entity(self.id)
}