pub struct Animation {
pub current_frame: u32,
pub frame_count: u32,
pub frame_duration: f32,
pub frame_timer: f32,
pub looping: bool,
pub playing: bool,
}Expand description
Animation component for animated sprites.
This component manages sprite animations including frame progression, timing, and playback control.
Fields§
§current_frame: u32Current frame index
frame_count: u32Total number of frames
frame_duration: f32Time per frame in seconds
frame_timer: f32Time accumulated for current frame
looping: boolWhether the animation should loop
playing: boolWhether the animation is currently playing
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Animation
impl<'de> Deserialize<'de> for Animation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Animation
Auto Trait Implementations§
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnsafeUnpin for Animation
impl UnwindSafe for Animation
Blanket Implementations§
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
Mutably borrows from an owned value. Read more