diff options
Diffstat (limited to 'ecs/examples/with_local.rs')
-rw-r--r-- | ecs/examples/with_local.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ecs/examples/with_local.rs b/ecs/examples/with_local.rs index d7af0e0..0bd8f66 100644 --- a/ecs/examples/with_local.rs +++ b/ecs/examples/with_local.rs @@ -1,5 +1,5 @@ use ecs::component::Local; -use ecs::system::{Into, System}; +use ecs::system::{Input as SystemInput, Into, System}; use ecs::{Query, World}; struct SomeData @@ -17,6 +17,8 @@ struct SayHelloState cnt: usize, } +impl SystemInput for SayHelloState {} + fn say_hello(mut query: Query<(SomeData, String)>, mut state: Local<SayHelloState>) { for (data, text) in query.iter_mut() { @@ -50,14 +52,16 @@ fn main() world.register_system( Event::Update, - say_hello.into_system().initialize(SayHelloState { cnt: 0 }), + say_hello + .into_system() + .initialize((SayHelloState { cnt: 0 },)), ); world.register_system( Event::Update, say_whats_up .into_system() - .initialize(SayHelloState { cnt: 0 }), + .initialize((SayHelloState { cnt: 0 },)), ); world.create_entity(( |