Function bevy::time::common_conditions::once_after_real_delay
source · pub fn once_after_real_delay(
duration: Duration
) -> impl FnMut(Res<'_, Time<Real>>) + Clone
Expand description
Run condition that is active once after the specified delay,
using Time<Real>
to advance the timer.
The timer ticks are not scaled.
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(
Update,
tick.run_if(once_after_delay(Duration::from_secs(1))),
)
.run();
}
fn tick() {
// ran once, after a second
}