SuperSpriteAnim.Reset C# (CSharp) Метод

Reset() публичный Метод

Resets the animation to the beginning.
public Reset ( ) : void
Результат void
	public void Reset()
	{
		Stop();

		curAnim = 0;
		stepDir = 1;
		numLoops = 0;

		// Hide all but the first:
		for (int i = 1; i < spriteAnims.Length; ++i)
			HideSprite(spriteAnims[i].sprite, true);
	}

Usage Example

Пример #1
0
    /// <summary>
    /// Plays the specified SuperSprite animation.
    /// </summary>
    /// <param name="anim">The SuperSprite animation to be played.</param>
    public void PlayAnim(SuperSpriteAnim anim)
    {
        if (!m_started)
        {
            Start();
        }

        if (curAnim != null)
        {
            curAnim.Hide(true);
        }

        curAnim = anim;
        curAnim.Reset();

        animating = true;
        anim.Play();
    }
All Usage Examples Of SuperSpriteAnim::Reset