[][src]Trait silver_animation::BasicAnimation

pub trait BasicAnimation<Size, Combined: AnimationShape<Size>> {
    pub fn draw(&mut self, gfx: &mut Graphics, location: Combined) -> Result<()>;

    pub fn contain(
        self,
        location: Combined
    ) -> BasicAnimationContainer<Self, Size, Combined>
    where
        Self: Sized
, { ... } }

A bare bones trait that is simply used to draw an animation at the given position

Required methods

pub fn draw(&mut self, gfx: &mut Graphics, location: Combined) -> Result<()>[src]

Draws the animation

Loading content...

Provided methods

pub fn contain(
    self,
    location: Combined
) -> BasicAnimationContainer<Self, Size, Combined> where
    Self: Sized
[src]

Turns the animation into a ContainedAnimation at the given position

This can make it easier to draw if the location (almost) never changes.

Loading content...

Implementors

impl<T, DrawFunc, MaxFrames> BasicAnimation<Vector, Rectangle> for Linear<T, DrawFunc, MaxFrames> where
    DrawFunc: Fn(&mut T, usize, &mut Graphics, Rectangle) -> Result<()>,
    MaxFrames: Fn(&T) -> usize
[src]

Loading content...