Exemplo n.º 1
0
    private void CheckFinishedStatus()
    {
        if (!newFadeFinish)
        {
            return;
        }

        newFadeFinish = false;
        AnimatorStateInfo info = animator.GetCurrentAnimatorStateInfo(0);

        if (info.IsName("FadeInFinished"))
        {
            Signals.EmitFadeInFinished();
        }
        else if (info.IsName("FadeOutFinished"))
        {
            Signals.EmitFadeOutFinished();
        }
        else
        {
            newFadeFinish = true;
        }
    }