diff options
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index 1983f66..0dd1c02 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -83,6 +83,8 @@ impl World ) where EventT: Event, { + system.prepare(&self.data); + self.systems.push(system.into_type_erased()); self.data @@ -159,6 +161,12 @@ impl World /// Will panic if a internal lock cannot be acquired. pub fn event_loop<EventSeq: EventSequence>(&self) { + self.data + .component_storage + .write_nonblock() + .expect("Failed to acquire read-write component storage lock") + .make_archetype_lookup_entries(); + let event_seq = EventSeq::ids(); loop { |