Struct rusty_spine::AnimationState
source · [−]pub struct AnimationState { /* private fields */ }
Expand description
The live animation state for a skeleton, allowing animation layering and crossfading.
Implementations
sourceimpl AnimationState
impl AnimationState
pub fn new(animation_state_data: Arc<AnimationStateData>) -> Self
pub fn update(&mut self, delta: f32)
pub fn apply(&self, skeleton: &mut Skeleton) -> bool
pub fn clear_tracks(&mut self)
pub fn clear_track(&mut self, track_index: i32)
pub unsafe fn set_animation_by_name_unchecked(
&mut self,
track_index: i32,
animation_name: &str,
looping: bool
) -> CTmpMut<'_, Self, TrackEntry>
pub fn set_animation_by_name(
&mut self,
track_index: i32,
animation_name: &str,
looping: bool
) -> Result<CTmpMut<'_, Self, TrackEntry>, Error>
pub fn set_animation(
&mut self,
track_index: i32,
animation: &Animation,
looping: bool
) -> CTmpMut<'_, Self, TrackEntry>
pub unsafe fn add_animation_by_name_unchecked(
&mut self,
track_index: i32,
animation_name: &str,
looping: bool,
delay: f32
) -> CTmpMut<'_, Self, TrackEntry>
pub fn add_animation_by_name(
&mut self,
track_index: i32,
animation_name: &str,
looping: bool,
delay: f32
) -> Result<CTmpMut<'_, Self, TrackEntry>, Error>
pub fn add_animation(
&mut self,
track_index: i32,
animation: &Animation,
looping: bool,
delay: f32
) -> CTmpMut<'_, Self, TrackEntry>
pub fn set_empty_animation(
&mut self,
track_index: i32,
mix_duration: f32
) -> CTmpMut<'_, Self, TrackEntry>
pub fn add_empty_animation(
&mut self,
track_index: i32,
mix_duration: f32,
delay: f32
) -> CTmpMut<'_, Self, TrackEntry>
pub fn set_empty_animations(&mut self, mix_duration: f32)
pub fn get_current(
&self,
track_index: i32
) -> Option<CTmpRef<'_, Self, TrackEntry>>
pub fn set_listener<F>(&mut self, listener: F)where
F: Fn(&AnimationState, EventType, &TrackEntry, Option<&Event>) + 'static,
pub fn clear_listener_notifications(&mut self)
pub fn clear_next(&mut self, entry: &TrackEntry)
pub fn data(&self) -> CTmpRef<'_, Self, AnimationStateData>
pub fn data_mut(&mut self) -> CTmpMut<'_, Self, AnimationStateData>
pub fn tracks_count(&self) -> i32
pub fn tracks(
&self
) -> CTmpPtrNullableIterator<'_, AnimationState, TrackEntry, spTrackEntry>ⓘNotable traits for CTmpPtrNullableIterator<'a, P, T, C>impl<'a, P, T, C> Iterator for CTmpPtrNullableIterator<'a, P, T, C>where
T: NewFromPtr<C>, type Item = Option<CTmpRef<'a, P, T>>;
T: NewFromPtr<C>, type Item = Option<CTmpRef<'a, P, T>>;
pub fn tracks_mut(
&mut self
) -> CTmpMutNullableIterator<'_, AnimationState, TrackEntry, spTrackEntry>ⓘNotable traits for CTmpMutNullableIterator<'a, P, T, C>impl<'a, P, T, C> Iterator for CTmpMutNullableIterator<'a, P, T, C>where
T: NewFromPtr<C>, type Item = Option<CTmpMut<'a, P, T>>;
T: NewFromPtr<C>, type Item = Option<CTmpMut<'a, P, T>>;
pub fn track_at_index(
&self,
index: usize
) -> Option<CTmpRef<'_, Self, TrackEntry>>
pub fn track_at_index_mut(
&mut self,
index: usize
) -> Option<CTmpMut<'_, Self, TrackEntry>>
pub fn timescale(&self) -> f32
pub fn set_timescale(&mut self, value: f32)
pub fn renderer_object(&self) -> RendererObject<'_>
pub fn dispose_statics()
pub fn c_ptr(&self) -> *mut spAnimationState
Trait Implementations
sourceimpl Debug for AnimationState
impl Debug for AnimationState
sourceimpl Drop for AnimationState
impl Drop for AnimationState
sourceimpl NewFromPtr<spAnimationState> for AnimationState
impl NewFromPtr<spAnimationState> for AnimationState
unsafe fn new_from_ptr(c_animation_state: *const spAnimationState) -> Self
Auto Trait Implementations
impl RefUnwindSafe for AnimationState
impl Send for AnimationState
impl Sync for AnimationState
impl Unpin for AnimationState
impl UnwindSafe for AnimationState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more