IEnumerator Closed() { yield return(new WaitForSeconds(DisappearTime)); animator.SetInteger("state", (int)UIDisplayState.Disable); OutAction.OnCompleteMethod(); }
private void noAnimationOut() { if (OutAction.OnStartMethod != null) { OutAction.OnStartMethod(); } if (OutAction.OnCompleteMethod != null) { OutAction.OnCompleteMethod(); } }
private void animatorOut() { OutAction.OnStartMethod(); if (animator != null) { animator.speed = 1f / DisappearTime; animator.SetInteger("state", (int)UIDisplayState.Showouting); DelayAction delay = new DelayAction(AppearTime, null, () => { animator.SetInteger("state", (int)UIDisplayState.Disable); OutAction.OnCompleteMethod(); }); delay.Play(); // StartCoroutine (Closed ()); } }
IEnumerator Closed(Animator anim) { if (anim != null) { bool closedStateReached = anim.GetCurrentAnimatorStateInfo(layer_Index).IsName(k_ClosedEndStateName); while (!closedStateReached) { if (!anim.IsInTransition(layer_Index)) { closedStateReached = anim.GetCurrentAnimatorStateInfo(layer_Index).IsName(k_ClosedEndStateName); } yield return(new WaitForEndOfFrame()); } } OutAction.OnCompleteMethod(); }