summaryrefslogtreecommitdiff
path: root/ecs/examples/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-12-09 14:05:33 +0100
committerHampusM <hampus@hampusmat.com>2024-12-09 14:05:33 +0100
commitdcc40c9205e5f4cf484523f97eb12a561d7b2b22 (patch)
tree2908b6ca3b2fa390a45b383b91edf7a72c42ef4b /ecs/examples/relationship.rs
parent158e36bf6bfcbc2ed0ffc670788ed8c0abd3f282 (diff)
refactor(ecs): use phases for system ordering
Diffstat (limited to 'ecs/examples/relationship.rs')
-rw-r--r--ecs/examples/relationship.rs6
1 files changed, 3 insertions, 3 deletions
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::<Holding, Sword>::new(sword_uid),
));
- world.emit(StartEvent);
+ world.step();
}