diff options
Diffstat (limited to 'engine/src')
-rw-r--r-- | engine/src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 9400e56..6d7c213 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -3,10 +3,12 @@ use ecs::component::Sequence as ComponentSequence; use ecs::entity::Uid as EntityUid; -use ecs::event::Event; +use ecs::event::component::ComponentToAddedEvent; +use ecs::event::{Event, Sequence as EventSequence}; use ecs::extension::Extension; use ecs::sole::Sole; use ecs::system::{Into, System}; +use ecs::tuple::Reduce as TupleReduce; use ecs::{SoleAlreadyExistsError, World}; use crate::delta_time::{update as update_delta_time, DeltaTime, LastUpdate}; @@ -75,7 +77,8 @@ impl Engine pub fn spawn<Comps>(&mut self, components: Comps) -> EntityUid where - Comps: ComponentSequence, + Comps: ComponentSequence + TupleReduce<ComponentToAddedEvent>, + Comps::Out: EventSequence, { self.world.create_entity(components) } |