예제 #1
0
 /// <summary>
 /// 当计数器计时进行中执行的事件链
 /// </summary>
 /// <param name="timer"></param>
 /// <param name="updateEvent"></param>
 /// <returns></returns>
 public static Timer OnUpdated(this Timer timer, Action <float> updateEvent)
 {
     if (null == timer)
     {
         return(null);
     }
     timer.AddEvent(updateEvent);
     return(timer);
 }
예제 #2
0
 /// <summary>
 /// 当计时器计数完成时执行的事件链
 /// </summary>
 /// <param name="timer"></param>
 /// <param name="completedEvent"></param>
 /// <returns></returns>
 public static Timer OnCompleted(this Timer timer, Action completedEvent)
 {
     if (null == timer)
     {
         return null;
     }
     timer.AddEvent(completedEvent);
     return timer;
 }
예제 #3
0
 /// <summary>
 /// 当计时器计数完成时执行的事件链
 /// </summary>
 /// <param name="timer"></param>
 /// <param name="completedEvent"></param>
 /// <returns></returns>
 public static Timer OnCompleted(this Timer timer, System.Action completedEvent)
 {
     if (null == timer)
     {
         return(null);
     }
     timer.AddEvent(completedEvent);
     return(timer);
 }
예제 #4
0
 /// <summary>
 /// 当计数器计时进行中执行的事件链
 /// </summary>
 /// <param name="timer"></param>
 /// <param name="updateEvent"></param>
 /// <returns></returns>
 public static Timer OnUpdated(this Timer timer, Action<float> updateEvent)
 {
     timer?.AddEvent(updateEvent);
     return timer;
 }