SpriteLibrary

# Sprite
AnimateJustAFewTimes Method

Start a new animation. It will complete the animation the number of times you specify. For example, if your sprite is walking, and one animation is one step, specifying 4 here will result in your sprite taking 4 steps and then the animation stops. You will want to make sure you are checking for when the animation stops, using the SpriteAnimationComplete event, checking the Sprite.AnimationDone flag.

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

    public void AnimateJustAFewTimes(
    	int WhichAnimation,
    	int HowManyAnimations,
    	int AnimationFrameToEndOn = -1
    )

#### Parameters

WhichAnimation
  Type: System
  Int32
  The animation index you want to use
HowManyAnimations
  Type: System
  Int32
  The number of animations to do before it stops
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