diff options
author | HampusM <hampus@hampusmat.com> | 2024-12-09 14:05:33 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-12-09 14:05:33 +0100 |
commit | dcc40c9205e5f4cf484523f97eb12a561d7b2b22 (patch) | |
tree | 2908b6ca3b2fa390a45b383b91edf7a72c42ef4b /ecs/examples/multiple_queries.rs | |
parent | 158e36bf6bfcbc2ed0ffc670788ed8c0abd3f282 (diff) |
refactor(ecs): use phases for system ordering
Diffstat (limited to 'ecs/examples/multiple_queries.rs')
-rw-r--r-- | ecs/examples/multiple_queries.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ecs/examples/multiple_queries.rs b/ecs/examples/multiple_queries.rs index 2736bce..1ae9d19 100644 --- a/ecs/examples/multiple_queries.rs +++ b/ecs/examples/multiple_queries.rs @@ -1,6 +1,6 @@ use std::fmt::Display; -use ecs::event::start::Start as StartEvent; +use ecs::phase::START as START_PHASE; use ecs::{Component, Query, World}; #[derive(Component)] @@ -61,7 +61,7 @@ fn main() { let mut world = World::new(); - world.register_system(StartEvent, do_attacks); + world.register_system(*START_PHASE, do_attacks); world.create_entity(( Health { health: 100 }, @@ -81,5 +81,5 @@ fn main() world.create_entity((AttackStrength::Strong,)); world.create_entity((AttackStrength::Weak,)); - world.emit(StartEvent); + world.step(); } |