Ejemplo n.º 1
0
    IEnumerator Closed()
    {
        yield return(new WaitForSeconds(DisappearTime));

        animator.SetInteger("state", (int)UIDisplayState.Disable);
        OutAction.OnCompleteMethod();
    }
Ejemplo n.º 2
0
 private void noAnimationOut()
 {
     if (OutAction.OnStartMethod != null)
     {
         OutAction.OnStartMethod();
     }
     if (OutAction.OnCompleteMethod != null)
     {
         OutAction.OnCompleteMethod();
     }
 }
Ejemplo n.º 3
0
    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 ());
        }
    }
Ejemplo n.º 4
0
 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();
 }