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

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

Starts the animation to playing.
public Play ( ) : void
Результат void
	public void Play()
	{
		// 		if(pingPong)
		// 		{	// Setup our last anim to loop back properly:
		// 			spriteAnims[spriteAnims.Length - 1].anim.loopReverse = true;
		// 		}

		isRunning = true;

		// Register our ending delegate:
		spriteAnims[curAnim].sprite.SetAnimCompleteDelegate(AnimFinished);

		HideSprite(spriteAnims[curAnim].sprite, false);
		spriteAnims[curAnim].Play();
	}

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::Play