pub struct SpriteAnimation { /* private fields */ }Expand description
A named sequence of frames that form an animation.
Implementations§
Source§impl SpriteAnimation
impl SpriteAnimation
pub fn get_name(&self) -> &String
pub fn get_mut_name(&mut self) -> &mut String
pub fn set_name(&mut self, val: String) -> &mut Self
pub fn get_frames(&self) -> &Vec<SpriteFrame>
pub fn get_mut_frames(&mut self) -> &mut Vec<SpriteFrame>
pub fn set_frames(&mut self, val: Vec<SpriteFrame>) -> &mut Self
pub fn get_mode(&self) -> AnimationMode
pub fn get_mut_mode(&mut self) -> &mut AnimationMode
pub fn set_mode(&mut self, val: AnimationMode) -> &mut Self
Source§impl SpriteAnimation
impl SpriteAnimation
pub fn new(name: String, frames: Vec<SpriteFrame>, mode: AnimationMode) -> Self
Trait Implementations§
Source§impl Clone for SpriteAnimation
impl Clone for SpriteAnimation
Source§fn clone(&self) -> SpriteAnimation
fn clone(&self) -> SpriteAnimation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpriteAnimation
impl Debug for SpriteAnimation
Source§impl PartialEq for SpriteAnimation
impl PartialEq for SpriteAnimation
Source§fn eq(&self, other: &SpriteAnimation) -> bool
fn eq(&self, other: &SpriteAnimation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SpriteAnimation
Auto Trait Implementations§
impl Freeze for SpriteAnimation
impl RefUnwindSafe for SpriteAnimation
impl Send for SpriteAnimation
impl Sync for SpriteAnimation
impl Unpin for SpriteAnimation
impl UnsafeUnpin for SpriteAnimation
impl UnwindSafe for SpriteAnimation
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