Trait libre_pvz_animation::curve::AnyComponent
source · pub trait AnyComponent<Target: ?Sized = dyn Any> {
// Required methods
fn component(&self) -> &Target;
fn component_mut(&mut self) -> &mut Target;
}
Expand description
Bevy tracks changes in mutable references like Mut
.
We use this interface to avoid unnecessarily marking the target component as changed.
Required Methods§
sourcefn component_mut(&mut self) -> &mut Target
fn component_mut(&mut self) -> &mut Target
Borrow the component as mutable and mark it dirty.