Пример #1
0
 /// <summary>
 /// 删除用户指定的计时触发器
 /// </summary>
 /// <param name="updateEvent">指定的Update事件(直接赋值匿名函数无效)</param>
 public static void DelTimer(Action<float> updateEvent)
 {
     Timer timer = timers.Find(v => v.UpdateEvent.Equals(updateEvent));
     timer?.Stop();
     if (ShowLog) Debug.Assert(null != timer, "【TimerTrigger(容错)】:查无此定时器!---方法名:【" + updateEvent.Method.Name + "】。");
 }
Пример #2
0
 /// <summary>
 /// 删除用户指定的计时触发器
 /// </summary>
 /// <param name="flag">指定的标识符</param>
 public static void DelTimer(Timer target)
 {
     target?.Stop();
 }
Пример #3
0
 /// <summary>
 /// 删除用户指定的计时触发器
 /// </summary>
 /// <param name="completedEvent">指定的完成事件(直接赋值匿名函数无效)</param>
 public static void DelTimer(Action completedEvent)
 {
     Timer timer = timers.Find(v => v.EndEvent.Equals(completedEvent));
     timer?.Stop();
     if (ShowLog) Debug.Assert(null != timer, "【TimerTrigger(容错)】:查无此定时器!---方法名:【" + completedEvent.Method.Name + "】。");
 }
Пример #4
0
 /// <summary>
 /// 删除用户指定的计时触发器
 /// </summary>
 /// <param name="flag">指定的标识符</param>
 public static void DelTimer(string flag)
 {
     Timer timer = GetTimer(flag);
     timer?.Stop();
     if (ShowLog) Debug.Assert(null != timer, "【TimerTrigger(容错)】:此定时器已完成触发或无此定时器!");
 }