diff --git a/crates/bevy_core/src/time/timer.rs b/crates/bevy_core/src/time/timer.rs index 4a9df0da96662..8671ab53b81d2 100644 --- a/crates/bevy_core/src/time/timer.rs +++ b/crates/bevy_core/src/time/timer.rs @@ -35,7 +35,7 @@ impl Timer { } /// Advances the timer by `delta` seconds. - pub fn tick(&mut self, delta: f32) { + pub fn tick(&mut self, delta: f32) -> &Self { let prev_finished = self.elapsed >= self.duration; if !prev_finished { self.elapsed += delta; @@ -47,6 +47,7 @@ impl Timer { if self.repeating && self.finished { self.elapsed %= self.duration; } + self } pub fn reset(&mut self) { diff --git a/crates/bevy_diagnostic/src/print_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/print_diagnostics_plugin.rs index 62bd855a95caa..cefc750bf68f3 100644 --- a/crates/bevy_diagnostic/src/print_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/print_diagnostics_plugin.rs @@ -69,8 +69,7 @@ impl PrintDiagnosticsPlugin { time: Res