Reset() public method

Reset the sprite.
public Reset ( ) : void
return void
Exemplo n.º 1
0
		/// <summary>
		/// Set the current animation and play it.
		/// </summary>
		/// <param name="sprite">Animation.</param>
		public void SetAnimation(SpriteBase sprite)
		{
			var idx = Animations.IndexOf(sprite);
			if(idx == -1)
				throw new ArgumentException("Sprite does not exist in the list of animations!");

			_CurrentAnimation = idx;
			sprite.Reset();
		}