diff --git a/crates/bevy_core/src/time/fixed_timestep.rs b/crates/bevy_core/src/time/fixed_timestep.rs index a22c874f92930..2143db7d4cc7a 100644 --- a/crates/bevy_core/src/time/fixed_timestep.rs +++ b/crates/bevy_core/src/time/fixed_timestep.rs @@ -10,6 +10,7 @@ use bevy_ecs::{ use bevy_utils::HashMap; use std::borrow::Cow; +#[derive(Debug)] pub struct FixedTimestepState { pub step: f64, pub accumulator: f64, @@ -49,14 +50,14 @@ impl FixedTimesteps { } pub struct FixedTimestep { - state: State, + state: LocalFixedTimestepState, internal_system: Box>, } impl Default for FixedTimestep { fn default() -> Self { Self { - state: State::default(), + state: LocalFixedTimestepState::default(), internal_system: Box::new(Self::prepare_system.system()), } } @@ -65,7 +66,7 @@ impl Default for FixedTimestep { impl FixedTimestep { pub fn step(step: f64) -> Self { Self { - state: State { + state: LocalFixedTimestepState { step, ..Default::default() }, @@ -75,7 +76,7 @@ impl FixedTimestep { pub fn steps_per_second(rate: f64) -> Self { Self { - state: State { + state: LocalFixedTimestepState { step: 1.0 / rate, ..Default::default() }, @@ -89,7 +90,7 @@ impl FixedTimestep { } fn prepare_system( - mut state: Local, + mut state: Local, time: Res