Function amethyst_animation::play_animation [] [src]

pub fn play_animation(
    controls: &mut WriteStorage<AnimationControl>,
    animation: &Handle<Animation>,
    entity: Entity,
    end: EndControl
)

Play a given animation on the given entity.

Parameters:

  • controls: animation control storage in the world.
  • animation: handle to the animation to run
  • entity: entity to run the animation on. Must either have an AnimationHierarchy that matches the Animation, or only refer to a single node, else the animation will not be run.
  • end: action to perform when the animation has reached its end.