summaryrefslogtreecommitdiff
path: root/ecs/src/extension.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/extension.rs')
-rw-r--r--ecs/src/extension.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/ecs/src/extension.rs b/ecs/src/extension.rs
index fc5a345..99320cb 100644
--- a/ecs/src/extension.rs
+++ b/ecs/src/extension.rs
@@ -1,7 +1,9 @@
use crate::component::Sequence as ComponentSequence;
-use crate::event::Event;
+use crate::event::component::ComponentToAddedEvent;
+use crate::event::{Event, Sequence as EventSequence};
use crate::sole::Sole;
use crate::system::System;
+use crate::tuple::Reduce as TupleReduce;
use crate::{SoleAlreadyExistsError, World};
/// A collection of systems, entities & soles that can be added to a [`World`].
@@ -38,7 +40,8 @@ impl<'world> Collector<'world>
/// Adds a entity to the [`World`].
pub fn add_entity<Comps>(&mut self, components: Comps)
where
- Comps: ComponentSequence,
+ Comps: ComponentSequence + TupleReduce<ComponentToAddedEvent>,
+ Comps::Out: EventSequence,
{
self.world.create_entity(components);
}