summaryrefslogtreecommitdiff
path: root/ecs/src/actions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/actions.rs')
-rw-r--r--ecs/src/actions.rs8
1 files changed, 7 insertions, 1 deletions
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<Ids: WithUidTuple>(&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)