Struct heron_core::PhysicsTime [−][src]
pub struct PhysicsTime { /* fields omitted */ }
Resource that controls the physics time scale
Example
fn main() { App::build() // ... Add plugins .insert_resource(PhysicsTime::new(0.5)) // ... Add systems .run(); }
Implementations
impl PhysicsTime
[src]
impl PhysicsTime
[src]#[must_use]pub fn new(scale: f32) -> Self
[src]
#[must_use]
pub fn new(scale: f32) -> SelfCreate a new physics time for the given scale (which must be >= 0).
Panics
Panic if the scale is negative.
pub fn pause(&mut self)
[src]
Pause the physics emulation, avoiding heron systems to run.
pub fn resume(&mut self)
[src]
Resume the physics emulation
pub fn set_scale(&mut self, scale: f32)
[src]
#[must_use]pub fn get_scale(&self) -> f32
[src]
#[must_use]
pub fn get_scale(&self) -> f32Get the physics emulation time scale
Trait Implementations
impl Clone for PhysicsTime
[src]
impl Clone for PhysicsTime
[src]fn clone(&self) -> PhysicsTime
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PhysicsTime
[src]
impl Copy for PhysicsTime
[src]impl Default for PhysicsTime
[src]
impl Default for PhysicsTime
[src]Auto Trait Implementations
impl RefUnwindSafe for PhysicsTime
impl RefUnwindSafe for PhysicsTime
impl Send for PhysicsTime
impl Send for PhysicsTime
impl Sync for PhysicsTime
impl Sync for PhysicsTime
impl Unpin for PhysicsTime
impl Unpin for PhysicsTime
impl UnwindSafe for PhysicsTime
impl UnwindSafe for PhysicsTime
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> FromWorld for T where
T: Default,
impl<T> FromWorld for T where
T: Default,
pub fn from_world(_world: &mut World) -> T
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
pub fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,