Struct quicksilver::graphics::Animation [−][src]
pub struct Animation { /* fields omitted */ }
A linear series of images with a constant frame delay
Frames advance by discrete ticks, which should be run in the update
section of a
quicksilver application loop rather than the draw
section. Draws may happen as
often as possible, whereas updates will have consistent rates
Methods
impl Animation
[src]
impl Animation
pub fn new<I>(images: I, frame_delay: u32) -> Animation where
I: IntoIterator<Item = Image>,
[src]
pub fn new<I>(images: I, frame_delay: u32) -> Animation where
I: IntoIterator<Item = Image>,
Create a new animation from a series of images and a frame delay
pub fn from_spritesheet<R>(
sheet: Image,
regions: R,
frame_delay: u32
) -> Animation where
R: IntoIterator<Item = Rectangle>,
[src]
pub fn from_spritesheet<R>(
sheet: Image,
regions: R,
frame_delay: u32
) -> Animation where
R: IntoIterator<Item = Rectangle>,
Create a new animation from regions of images from a spritesheet
pub fn tick(&mut self)
[src]
pub fn tick(&mut self)
Tick the animation forward by one step
pub fn current_frame(&self) -> &Image
[src]
pub fn current_frame(&self) -> &Image
Get the current frame of the animation
Trait Implementations
impl Clone for Animation
[src]
impl Clone for Animation
fn clone(&self) -> Animation
[src]
fn clone(&self) -> Animation
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Animation
[src]
impl Debug for Animation