From 43cbd47900d23801c584def1b7877fdea700c23a Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 7 Jun 2025 22:52:36 +0200 Subject: feat(ecs): make component removals queryable This replaces the old component removed events --- ecs/src/entity.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ecs/src/entity.rs') diff --git a/ecs/src/entity.rs b/ecs/src/entity.rs index 4496a2b..bab3d61 100644 --- a/ecs/src/entity.rs +++ b/ecs/src/entity.rs @@ -96,6 +96,11 @@ impl<'a> Handle<'a> } } + pub fn component_ids(&self) -> impl Iterator + '_ + { + self.archetype.component_ids_sorted() + } + pub(crate) fn new(archetype: &'a Archetype, entity: &'a ArchetypeEntity) -> Self { Self { archetype, entity } -- cgit v1.2.3-18-g5258