diff --git a/content/learn/book/getting-started/resources/_index.md b/content/learn/book/getting-started/resources/_index.md index 523108906f..c7ec32a7de 100644 --- a/content/learn/book/getting-started/resources/_index.md +++ b/content/learn/book/getting-started/resources/_index.md @@ -50,12 +50,11 @@ fn greet_people( } ``` -Now all that's left is adding a `GreetTimer` Resource to our `HelloPlugin`: +Now all that's left is adding a `GreetTimer` Resource to our `HelloPlugin`. Use `TimerMode::Repeating` to make the timer repeat. ```rs impl Plugin for HelloPlugin { fn build(&self, app: &mut App) { - // the reason we call from_seconds with the true flag is to make the timer repeat itself - app.insert_resource(GreetTimer(Timer::from_seconds(2.0, true))) + app.insert_resource(GreetTimer(Timer::from_seconds(2.0, TimerMode::Repeating))) .add_startup_system(add_people) .add_system(greet_people); }