diff options
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index cf2f198..0da8b71 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -13,6 +13,7 @@ use crate::actions::Action; use crate::component::storage::Storage as ComponentStorage; use crate::component::{Component, Id as ComponentId, Sequence as ComponentSequence}; use crate::entity::Uid as EntityUid; +use crate::event::start::Start as StartEvent; use crate::event::{Event, Id as EventId, Ids, Sequence as EventSequence}; use crate::extension::{Collector as ExtensionCollector, Extension}; use crate::lock::Lock; @@ -195,7 +196,8 @@ impl World .make_archetype_lookup_entries(); } - /// A event loop which runs until a stop is issued with [`Flags::stop`]. + /// A event loop which runs until a stop is issued with [`Flags::stop`]. Before the + /// loop begins, [`StartEvent`] is emitted. /// /// # Panics /// Will panic if a internal lock cannot be acquired. @@ -203,6 +205,8 @@ impl World { self.prepare(); + self.emit(StartEvent); + let event_seq = EventSeq::ids(); loop { |