/// <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); }
/// <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; }
/// <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); }
/// <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; }