From 265f8c1a7076836654562531cdf5c1ff831ec354 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Mon, 25 Sep 2017 14:51:27 -0500 Subject: [PATCH] AnimateJustAFewTimes doc --- SpriteLibrary/Sprite.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/SpriteLibrary/Sprite.cs b/SpriteLibrary/Sprite.cs index c43e683..57cafe1 100644 --- a/SpriteLibrary/Sprite.cs +++ b/SpriteLibrary/Sprite.cs @@ -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 event, + /// checking the flag. /// + /// + /// 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. + /// + /// Sprite NewSprite = MySpriteController.DuplicateSprite("Dragon"); + /// NewSprite.AutomaticallyMoves = true; + /// NewSprite.SetSpriteDirectionDegrees(90); + /// NewSprite.PutBaseImageLocation(new Point(startx, starty)); + /// NewSprite.MovementSpeed = speed; + /// NewSprite.AnimateJustAFewTimes(0,3); + /// + /// /// The animation index you want to use /// The number of animations to do before it stops /// Once the animation has finished, display this animation frame.