Struct bevy_ecs::system::SystemChangeTick
source · pub struct SystemChangeTick { /* private fields */ }
Expand description
A SystemParam
that reads the previous and current change ticks of the system.
A system’s change ticks are updated each time it runs:
last_change_tick
copies the previous value ofchange_tick
change_tick
copies the current value ofWorld::read_change_tick
Component change ticks that are more recent than last_change_tick
will be detected by the system.
Those can be read by calling last_changed
on a Mut<T>
or ResMut<T>
.
Implementations§
source§impl SystemChangeTick
impl SystemChangeTick
sourcepub fn change_tick(&self) -> u32
pub fn change_tick(&self) -> u32
Returns the current World
change tick seen by the system.
sourcepub fn last_change_tick(&self) -> u32
pub fn last_change_tick(&self) -> u32
Returns the World
change tick seen by the system the previous time it ran.
Trait Implementations§
source§impl Debug for SystemChangeTick
impl Debug for SystemChangeTick
source§impl SystemParam for SystemChangeTick
impl SystemParam for SystemChangeTick
Auto Trait Implementations§
impl RefUnwindSafe for SystemChangeTick
impl Send for SystemChangeTick
impl Sync for SystemChangeTick
impl Unpin for SystemChangeTick
impl UnwindSafe for SystemChangeTick
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresource§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more