From b1cc7ad72f613a9ce95f6ac4cdd2947f1e465a66 Mon Sep 17 00:00:00 2001 From: SecretPocketCat Date: Fri, 20 Oct 2023 14:58:37 +0200 Subject: [PATCH] add on_real_time_timer run condition (#10179) # Objective Fixes #10177 . ## Solution Added a new run condition and tweaked the docs for `on_timer`. ## Changelog ### Added - `on_real_time_timer` run condition --- crates/bevy_time/src/common_conditions.rs | 40 +++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/crates/bevy_time/src/common_conditions.rs b/crates/bevy_time/src/common_conditions.rs index 217d7daf73..1e4fbc8d5a 100644 --- a/crates/bevy_time/src/common_conditions.rs +++ b/crates/bevy_time/src/common_conditions.rs @@ -1,9 +1,9 @@ -use crate::{Time, Timer, TimerMode}; +use crate::{Real, Time, Timer, TimerMode}; use bevy_ecs::system::Res; use bevy_utils::Duration; /// Run condition that is active on a regular time interval, using [`Time`] to advance -/// the timer. +/// the timer. The timer ticks at the rate of [`Time::relative_speed`]. /// /// ```rust,no_run /// # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, PluginGroup, Update}; @@ -38,6 +38,42 @@ pub fn on_timer(duration: Duration) -> impl FnMut(Res