SpriteLibrary

# Sprite
AnimateOnce Method

Start a new animation, but do it just once. You can use AnimateJustAFewTimes(1) to the same effect. Or, you can use AnimateJustAFewTimes with a different number. The SpriteAnimationComplete event will fire off when the animation completes. The variable, Sprite.AnimationDone will be true once the animation finishes animating.

Namespace: SpriteLibrary
Assembly: SpriteLibrary (in SpriteLibrary.dll) Version: 1.0.0.5 (1.0.0.5)
Syntax
C#
Copy

    public void AnimateOnce(
    	int WhichAnimation,
    	int AnimationFrameToEndOn = -1
    )

#### Parameters

WhichAnimation
  Type: System
  Int32
  The animation index you want to use
AnimationFrameToEndOn (Optional)
  Type: System
  Int32
  Once the animation has finished, display this animation frame. -1, or any number that is not an actual frame, will show the last frame of the animation.

See Also

#### Reference

Sprite Class
SpriteLibrary Namespace