Exemplo n.º 1
0
    public IEnumerator AnimationOfSprite()      // animation off object (example: ball, multi-ball etc.)]
    {
        bool      isAnim = true;
        ThrowBall tb     = SaveComponent.GetComponent <ThrowBall>();

        if (tb != null)
        {
            if (tb.This_destroyBall || tb.This_multiBall)
            {
                isAnim = false;
            }
        }
        if (isAnim)
        {
            SaveComponent.AnimationOfBall(0.5f);
            yield return(new WaitForFixedUpdate());

            StartCoroutine("AnimationOfSprite");
        }
        else
        {
            yield return(new WaitForFixedUpdate());
        }
    }