Example #1
0
        internal override bool Update(ActionSequence actionSequence, float deltaTime)
        {
            actionSequence.UpdateTimeAxis(deltaTime);
            if (null != action)
            {
                try
                {
                    action();
                }
                catch (Exception e)
                {
                    Debug.LogException(e);
                    actionSequence.Stop();
                }
            }
            else if (null != actionLoop)
            {
                try
                {
                    actionLoop(actionSequence.cycles);
                }
                catch (Exception e)
                {
                    Debug.LogException(e);
                    actionSequence.Stop();
                }
            }

            return(true);
        }
 public void StopSequence()
 {
     if (sequence != null)
     {
         sequence.Stop();
     }
 }
Example #3
0
 /// <summary>
 /// 用Component作为ID停止指定的序列
 /// </summary>
 /// <param name="id"></param>
 /// <param name="sequence">停止指定的ActionSequence</param>
 public static void StopSequence(this Component id, ActionSequence sequence)
 {
     if (sequence != null)
     {
         sequence.Stop(id);
     }
 }
        public void Stop()
        {
            isPlaying = false;
#if DOTween
            DOTween.Kill(this);
#else
            if (timer != null)
            {
                timer.Stop();
            }
#endif
        }
Example #5
0
        internal override bool Update(ActionSequence actionSequence, float deltaTime)
        {
            bool res = false;

            try
            {
                res = condition();
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                actionSequence.Stop();
                return(true);
            }

            return(res);
        }
Example #6
0
 /// <summary>
 /// 停止sequence
 /// </summary>
 /// <localize>
 /// <zh-CN>停止当前控制的sequence</zh-CN>
 /// <en>Stop the handling sequence</en>
 /// </localize>
 public void StopSequence()
 {
     sequence?.Stop();
 }
 /// <summary>
 /// 用Component作为ID停止指定的序列
 /// </summary>
 /// <param name="id"></param>
 /// <param name="sequence">停止指定的ActionSequence</param>
 public static void StopSequence(this Component id, ActionSequence sequence)
 {
     sequence?.Stop(id);
 }