Struct bevy_tweening::TweenCompleted
source · pub struct TweenCompleted {
pub entity: Entity,
pub user_data: u64,
}
Expand description
Event raised when a tween completed.
This event is raised when a tween completed. When looping, this is raised
once per iteration. In case the animation direction changes
(RepeatStrategy::MirroredRepeat
), an iteration corresponds to a single
progress from one endpoint to the other, whatever the direction. Therefore a
complete cycle start -> end -> start counts as 2 iterations and raises 2
events (one when reaching the end, one when reaching back the start).
§Note
The semantic is slightly different from TweenState::Completed
, which
indicates that the tweenable has finished ticking and do not need to be
updated anymore, a state which is never reached for looping animation. Here
the TweenCompleted
event instead marks the end of a single loop
iteration.
Fields§
§entity: Entity
The [Entity
] the tween which completed and its animator are attached
to.
user_data: u64
An opaque value set by the user when activating event raising, used to
identify the particular tween which raised this event. The value is
passed unmodified from a call to with_completed_event()
or set_completed_event()
.
Trait Implementations§
source§impl Clone for TweenCompleted
impl Clone for TweenCompleted
source§fn clone(&self) -> TweenCompleted
fn clone(&self) -> TweenCompleted
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Copy for TweenCompleted
impl Event for TweenCompleted
Auto Trait Implementations§
impl RefUnwindSafe for TweenCompleted
impl Send for TweenCompleted
impl Sync for TweenCompleted
impl Unpin for TweenCompleted
impl UnwindSafe for TweenCompleted
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.