From 48a415c63b7b98c5947e1517370eb8323b7b2a33 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 14 Aug 2024 20:08:13 +0200 Subject: fix(engine): make Engine::spawn have bound TupleReduce on Comps --- engine/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engine/src/lib.rs') 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(&mut self, components: Comps) -> EntityUid where - Comps: ComponentSequence, + Comps: ComponentSequence + TupleReduce, + Comps::Out: EventSequence, { self.world.create_entity(components) } -- cgit v1.2.3-18-g5258