AnimateJustAFewTimes doc

This commit is contained in:
Tim Young 2017-09-25 14:51:27 -05:00
parent 56d280ae1e
commit 265f8c1a70
1 changed files with 14 additions and 2 deletions

View File

@ -750,9 +750,21 @@ namespace SpriteLibrary
/// 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.
/// to make sure you are checking for when the animation stops, using the <see cref="SpriteAnimationComplete"/> event,
/// checking the <see cref="Sprite.AnimationDone"/> flag.
/// </summary>
/// <example>
/// This code creates a new dragon, puts him on the screen, points him a direction, and tells him to
/// move. Finally, it tells it to cycle through a few animations.
/// <code lang="C#">
/// Sprite NewSprite = MySpriteController.DuplicateSprite("Dragon");
/// NewSprite.AutomaticallyMoves = true;
/// NewSprite.SetSpriteDirectionDegrees(90);
/// NewSprite.PutBaseImageLocation(new Point(startx, starty));
/// NewSprite.MovementSpeed = speed;
/// NewSprite.AnimateJustAFewTimes(0,3);
/// </code>
/// </example>
/// <param name="WhichAnimation">The animation index you want to use</param>
/// <param name="HowManyAnimations">The number of animations to do before it stops</param>
/// <param name="AnimationFrameToEndOn">Once the animation has finished, display this animation frame.