示例#1
0
 /// <summary>
 /// 删除用户指定的计时触发器
 /// </summary>
 /// <param name="timer"></param>
 public static void DelTimer(ETimer timer)
 {
     if (Exist(timer))
     {
         timer.Stop();
     }
     else
     {
         if (showLog)
         {
             Debug.Log("【TimerTrigger(容错)】:此定时器已完成触发或无此定时器!");
         }
     }
 }
示例#2
0
        /// <summary>
        /// 删除用户指定的计时触发器
        /// </summary>
        /// <param name="updateEvent">指定的Update事件(直接赋值匿名函数无效)</param>
        public static void DelTimer(Action <float> updateEvent)
        {
            ETimer timer = timers.Find((v) => { return(v.UpdateEvent == updateEvent); });

            if (null != timer)
            {
                timer.Stop();
            }
            else
            {
                if (showLog)
                {
                    Debug.Log("【TimerTrigger(容错)】:定时器已完成触发或无此定时器!---方法名:【" + updateEvent.Method.Name + "】。");
                }
            }
        }
示例#3
0
        /// <summary>
        /// 删除用户指定的计时触发器
        /// </summary>
        /// <param name="flag">指定的标识符</param>
        public static void DelTimer(string flag)
        {
            ETimer timer = GetTimer(flag);

            if (null != timer)
            {
                timer.Stop();
            }
            else
            {
                if (showLog)
                {
                    Debug.Log("【TimerTrigger(容错)】:此定时器已完成触发或无此定时器!");
                }
            }
        }