From cb1197a132f87cd5034bb8927fdbd09878d9239a Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 13 Oct 2025 18:50:30 +0200 Subject: feat(ecs): add Actions::remove_comps fn --- ecs/src/actions.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ecs/src/actions.rs') diff --git a/ecs/src/actions.rs b/ecs/src/actions.rs index f8a59fa..549e341 100644 --- a/ecs/src/actions.rs +++ b/ecs/src/actions.rs @@ -6,7 +6,7 @@ use crate::component::{Parts as ComponentParts, Sequence as ComponentSequence}; use crate::event::component::Removed; use crate::pair::Pair; use crate::system::{Metadata as SystemMetadata, Param as SystemParam}; -use crate::uid::{Kind as UidKind, Uid}; +use crate::uid::{Kind as UidKind, Uid, WithUidTuple}; use crate::{ActionQueue, World}; /// Used to to queue up actions for a [`World`] to perform. @@ -139,6 +139,12 @@ impl Actions<'_> .push(Action::RemoveComponents(entity_uid, component_ids)); } + /// Queues up removing component(s) from a entity at the end of the current tick. + pub fn remove_comps(&mut self, entity_uid: Uid) + { + self.remove_components(entity_uid, Ids::uids()); + } + /// Stops the [`World`]. The world will finish the current tick and that tick will be /// the last. pub fn stop(&mut self) -- cgit v1.2.3-18-g5258