예제 #1
0
    // When true, indicates that the corresponding
    // transition should apply to all children of
    // this object.

/*
 *      [HideInInspector]
 *      public bool[] applyToChildren = new bool[4];
 */
    protected virtual void OnDisable()
    {
        if (Application.isPlaying && EZAnimator.Exists())
        {
            EZAnimator.instance.Stop(gameObject);
        }
    }
예제 #2
0
 protected override void OnDisable()
 {
     base.OnDisable();
     if (this.transitionQueued)
     {
         this.nextTransition.RemoveTransitionEndDelegate(new EZTransition.OnTransitionEndDelegate(this.RunFollowupTrans));
         this.transitionQueued = false;
     }
     if (EZAnimator.Exists() && !this.deleted)
     {
         bool flag = this.alwaysFinishActiveTransition;
         this.alwaysFinishActiveTransition = false;
         if (this.controlState == UIButton.CONTROL_STATE.DISABLED)
         {
             this.SetControlState(UIButton.CONTROL_STATE.DISABLED);
         }
         else if (!this.isListButton)
         {
             this.SetControlState(UIButton.CONTROL_STATE.NORMAL);
         }
         if (this.prevTransition != null && this.prevTransition.IsRunning())
         {
             this.prevTransition.End();
         }
         this.alwaysFinishActiveTransition = flag;
     }
     this.prevTransition = null;
 }
    protected override void OnDisable()
    {
        base.OnDisable();

        if (Application.isPlaying && EZAnimator.Exists())
        {
            EZAnimator.instance.Stop(gameObject);
            EZAnimator.instance.Stop(this);
        }
    }
 public void DeleteAnim()
 {
     if (EZAnimator.Exists())
     {
         for (int i = 0; i < this.uiObjs.Count; i++)
         {
             EZAnimator.instance.Stop(this.uiObjs[i].gameObject);
             EZAnimator.instance.Stop(this.uiObjs[i]);
         }
     }
 }
 protected virtual void OnDisable()
 {
     if (Application.isPlaying)
     {
         if (EZAnimator.Exists())
         {
             EZAnimator.instance.Stop(base.gameObject);
         }
         if (this.detargetOnDisable && UIManager.Exists())
         {
             NrTSingleton <UIManager> .Instance.Detarget(this);
         }
     }
 }
예제 #6
0
    // When true, indicates that the corresponding
    // transition should apply to all children of
    // this object.

/*
 *      [HideInInspector]
 *      public bool[] applyToChildren = new bool[4];
 */
    protected virtual void OnDisable()
    {
        if (Application.isPlaying)
        {
            if (EZAnimator.Exists())
            {
                EZAnimator.instance.Stop(gameObject);
            }

            if (detargetOnDisable && UIManager.Exists())
            {
                UIManager.instance.Detarget(this);
            }
        }
    }
 public override void OnDisable()
 {
     if (Application.isPlaying)
     {
         if (EZAnimator.Exists() && this.autoAnimatorStop)
         {
             EZAnimator.instance.Stop(base.gameObject);
             EZAnimator.instance.Stop(this);
         }
         if (this.detargetOnDisable && UIManager.Exists())
         {
             NrTSingleton <UIManager> .Instance.Detarget(this);
         }
     }
 }
예제 #8
0
    protected override void OnDisable()
    {
        base.OnDisable();

        // Cancel any queued transitions:
        if (transitionQueued)
        {
            nextTransition.RemoveTransitionEndDelegate(RunFollowupTrans);
            transitionQueued = false;
        }

        // Revert to our normal state, but if there isn't
        // an EZAnimator, then we either don't need to
        // revert, or we don't want to because the scene
        // is closing:
        if (EZAnimator.Exists() && !deleted)
        {
            // Temporarily disable running follow-up transitions:
            bool prevAFAT = alwaysFinishActiveTransition;
            alwaysFinishActiveTransition = false;

            if (controlState == CONTROL_STATE.DISABLED)
            {
                SetControlState(CONTROL_STATE.DISABLED);
            }
            else
            {
                SetControlState(CONTROL_STATE.NORMAL);
            }

            // Cancel any running transition:
            if (prevTransition != null)
            {
                if (prevTransition.IsRunning())
                {
                    prevTransition.End();
                }
            }

            // Restore our setting:
            alwaysFinishActiveTransition = prevAFAT;
        }

        prevTransition = null;
    }
예제 #9
0
    protected override void OnDisable()
    {
        base.OnDisable();

        // Revert to our normal state, but if there isn't
        // an EZAnimator, then we either don't need to
        // revert, or we don't want to because the scene
        // is closing:
        if (EZAnimator.Exists() && !deleted)
        {
            if (controlState == CONTROL_STATE.DISABLED)
            {
                SetControlState(CONTROL_STATE.DISABLED);
            }
            else
            {
                SetControlState(CONTROL_STATE.NORMAL);
            }
        }
    }