IEnumerator Open() { yield return(new WaitForSeconds(AppearTime)); InAction.OnCompleteMethod(); animator.SetInteger("state", (int)UIDisplayState.Normal); }
private void animatorIn() { InAction.OnStartMethod(); if (animator != null) { animator.speed = 1f / AppearTime; animator.SetInteger("state", (int)UIDisplayState.Showining); DelayAction delay = new DelayAction(AppearTime, null, () => { InAction.OnCompleteMethod(); animator.SetInteger("state", (int)UIDisplayState.Normal); }); delay.Play(); // StartCoroutine (Open ()); } }
private void noAnimationIn() { if (InAction.OnStartMethod != null) { InAction.OnStartMethod(); } transform.localScale = Vector3.one; if (InAction.OnCompleteMethod != null) { InAction.OnCompleteMethod(); } }
IEnumerator Open(Animator anim) { if (anim != null) { bool closedStateReached = anim.GetCurrentAnimatorStateInfo(layer_Index).IsName(k_OpenEndStateName); while (!closedStateReached) { if (!anim.IsInTransition(layer_Index)) { closedStateReached = anim.GetCurrentAnimatorStateInfo(layer_Index).IsName(k_OpenEndStateName); } yield return(new WaitForEndOfFrame()); } } InAction.OnCompleteMethod(); }