diff options
Diffstat (limited to 'ecs/examples/simple.rs')
-rw-r--r-- | ecs/examples/simple.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/ecs/examples/simple.rs b/ecs/examples/simple.rs index 9983c4a..6949308 100644 --- a/ecs/examples/simple.rs +++ b/ecs/examples/simple.rs @@ -1,4 +1,4 @@ -use ecs::event::{Event, Id as EventId}; +use ecs::event::Event; use ecs::{Component, Query, World}; #[derive(Component)] @@ -23,19 +23,13 @@ fn say_hello(query: Query<(SomeData, Greeting)>) #[derive(Debug)] struct Start; -impl Event for Start -{ - fn id(&self) -> EventId - { - EventId::of::<Self>() - } -} +impl Event for Start {} fn main() { let mut world = World::new(); - world.register_system(&Start, say_hello); + world.register_system(Start, say_hello); world.create_entity(( SomeData { num: 987_654 }, @@ -49,5 +43,5 @@ fn main() Greeting { greeting: "Good evening".to_string() }, )); - world.emit(&Start); + world.emit(Start); } |