summaryrefslogtreecommitdiff
path: root/ecs/src/entity.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-09-13 19:24:29 +0200
committerHampusM <hampus@hampusmat.com>2025-09-13 19:24:29 +0200
commit6e7abf273d758bf15c1ba3e331e370b2bea3f8e2 (patch)
treed13ad55858583e0546632aeeb0b7336677378621 /ecs/src/entity.rs
parent1bf48462393099d971b7a8613bd945d863d97273 (diff)
feat(ecs): re-implement component added & removed eventsHEADmaster
Diffstat (limited to 'ecs/src/entity.rs')
-rw-r--r--ecs/src/entity.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/ecs/src/entity.rs b/ecs/src/entity.rs
index bec50cd..6ee5ad8 100644
--- a/ecs/src/entity.rs
+++ b/ecs/src/entity.rs
@@ -173,6 +173,12 @@ impl<'a> Handle<'a>
.contains_component_with_exact_id(component_uid)
}
+ /// Returns the `Uids`s of the components this entity has.
+ pub fn component_ids(&self) -> impl Iterator<Item = Uid> + '_
+ {
+ self.archetype.component_ids_sorted()
+ }
+
pub(crate) fn new(
archetype: &'a Archetype,
entity: &'a ArchetypeEntity,