[][src]Struct quicksilver::graphics::Animation

pub struct Animation { /* fields omitted */ }
Deprecated since 0.3.16:

Animation is too inflexible for most users; an external solution is a better option

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]

pub fn new<I>(images: I, frame_delay: u32) -> Animation where
    I: IntoIterator<Item = Image>, 
[src]

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]

Create a new animation from regions of images from a spritesheet

pub fn tick(&mut self)[src]

Tick the animation forward by one step

pub fn current_frame(&self) -> &Image[src]

Get the current frame of the animation

Trait Implementations

impl Clone for Animation[src]

impl Debug for Animation[src]

Auto Trait Implementations

impl !Send for Animation

impl !Sync for Animation

impl Unpin for Animation

impl !UnwindSafe for Animation

impl !RefUnwindSafe for Animation

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Downcast for T where
    T: Any