diff --git a/src/main.rs b/src/main.rs index f47d66d..83e0556 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,9 +20,14 @@ fn add_people(mut commands: Commands) { commands.spawn((Person, Name("Zayna Nieves".to_string()))); } -fn greet_people(query: Query<&Name, With>) { - for name in &query { - println!("hello {}!", name.0); +#[derive(Resource)] +struct GreetTimer(Timer); + +fn greet_people(time: Res