diff options
Diffstat (limited to 'ecs/examples/simple.rs')
-rw-r--r-- | ecs/examples/simple.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ecs/examples/simple.rs b/ecs/examples/simple.rs index 7212159..d29970d 100644 --- a/ecs/examples/simple.rs +++ b/ecs/examples/simple.rs @@ -1,4 +1,4 @@ -use ecs::event::Event; +use ecs::event::start::Start as StartEvent; use ecs::{Component, Query, World}; #[derive(Component)] @@ -20,16 +20,11 @@ fn say_hello(query: Query<(SomeData, Greeting)>) } } -#[derive(Debug)] -struct Start; - -impl Event for Start {} - fn main() { let mut world = World::new(); - world.register_system(Start, say_hello); + world.register_system(StartEvent, say_hello); world.create_entity(( SomeData { num: 987_654 }, @@ -45,5 +40,5 @@ fn main() world.prepare(); - world.emit(Start); + world.emit(StartEvent); } |