summaryrefslogtreecommitdiff
path: root/ecs/examples/relationship.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/examples/relationship.rs')
-rw-r--r--ecs/examples/relationship.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/ecs/examples/relationship.rs b/ecs/examples/relationship.rs
index 8610b47..ce39af6 100644
--- a/ecs/examples/relationship.rs
+++ b/ecs/examples/relationship.rs
@@ -1,4 +1,4 @@
-use ecs::event::Event;
+use ecs::event::start::Start as StartEvent;
use ecs::relationship::Relationship;
use ecs::{Component, Query, World};
@@ -30,16 +30,11 @@ fn print_player_stats(player_query: Query<(Player, Health, Relationship<Holding,
}
}
-#[derive(Debug)]
-struct Start;
-
-impl Event for Start {}
-
fn main()
{
let mut world = World::new();
- world.register_system(Start, print_player_stats);
+ world.register_system(StartEvent, print_player_stats);
let sword_uid = world.create_entity((Sword { attack_strength: 17 },));
@@ -51,5 +46,5 @@ fn main()
world.prepare();
- world.emit(Start);
+ world.emit(StartEvent);
}