From bc0fe6dbb23599463b7136bd47eeabae45afba35 Mon Sep 17 00:00:00 2001 From: thejohnbackes Date: Sat, 12 Nov 2022 13:25:27 -0800 Subject: [PATCH] Update _index.md Updated Getting Started docs to match the change at https://github.com/bevyengine/bevy/pull/6247 and replace from_seconds(time, bool) with from_seconds(time, TimerMode) --- content/learn/book/getting-started/resources/_index.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); }