Ejemplo n.º 1
0
    IEnumerator Open()
    {
        yield return(new WaitForSeconds(AppearTime));

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

        transform.localScale = Vector3.one;

        if (InAction.OnCompleteMethod != null)
        {
            InAction.OnCompleteMethod();
        }
    }
Ejemplo n.º 4
0
 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();
 }