summaryrefslogtreecommitdiff
path: root/ecs/examples/multiple_queries.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/examples/multiple_queries.rs')
-rw-r--r--ecs/examples/multiple_queries.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/ecs/examples/multiple_queries.rs b/ecs/examples/multiple_queries.rs
index 4bc12a3..d1fd3f1 100644
--- a/ecs/examples/multiple_queries.rs
+++ b/ecs/examples/multiple_queries.rs
@@ -1,6 +1,6 @@
use std::fmt::Display;
-use ecs::event::Event;
+use ecs::event::start::Start as StartEvent;
use ecs::{Component, Query, World};
#[derive(Component)]
@@ -57,16 +57,11 @@ fn do_attacks(
}
}
-#[derive(Debug, PartialEq, Eq, Hash)]
-struct Start;
-
-impl Event for Start {}
-
fn main()
{
let mut world = World::new();
- world.register_system(Start, do_attacks);
+ world.register_system(StartEvent, do_attacks);
world.create_entity((
Health { health: 100 },
@@ -88,5 +83,5 @@ fn main()
world.prepare();
- world.emit(Start);
+ world.emit(StartEvent);
}