diff --git a/src/main.rs b/src/main.rs index 632e254..5ff9d23 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,13 +24,15 @@ fn add_people(mut commands: Commands) { commands.spawn((Person, Name("Renzo Hume".to_string()))); commands.spawn((Person, Name("Zayna Nieves".to_string()))); } -#[derive(Component)] +#[derive(Resource)] struct GreetTimer(Timer); //endregion //region query -fn greet_people(query: Query<&Name, With>) { - for name in &query { - println!("hello {}!", name.0); +fn greet_people(time: Res