From dcc40c9205e5f4cf484523f97eb12a561d7b2b22 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 9 Dec 2024 14:05:33 +0100 Subject: refactor(ecs): use phases for system ordering --- ecs/examples/relationship.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ecs/examples/relationship.rs') diff --git a/ecs/examples/relationship.rs b/ecs/examples/relationship.rs index e8fb327..1b3d1de 100644 --- a/ecs/examples/relationship.rs +++ b/ecs/examples/relationship.rs @@ -1,4 +1,4 @@ -use ecs::event::start::Start as StartEvent; +use ecs::phase::START as START_PHASE; use ecs::relationship::Relationship; use ecs::{Component, Query, World}; @@ -34,7 +34,7 @@ fn main() { let mut world = World::new(); - world.register_system(StartEvent, print_player_stats); + world.register_system(*START_PHASE, print_player_stats); let sword_uid = world.create_entity((Sword { attack_strength: 17 },)); @@ -44,5 +44,5 @@ fn main() Relationship::::new(sword_uid), )); - world.emit(StartEvent); + world.step(); } -- cgit v1.2.3-18-g5258