public Timer(string name, TimerManager.TIMER_MODE mode, float startTime, float duration, TimerManager.TimerManagerHandler handler) { this.m_Name = name; this.m_Mode = mode; this.m_StartTime = startTime; this.m_duration = duration; this.m_TimerEvent = handler; }
public Timer(string name, TimerManager.TIMER_MODE mode, float startTime, float duration, TimerManager.TimerManagerCountHandlerArgs handler, params object[] args) { this.m_Name = name; this.m_Mode = mode; this.m_StartTime = startTime; this.m_duration = duration; this.m_TimerCountArgsEvent = handler; this.m_Args = args; }
private static bool Internal_AddTimer(string key, TimerManager.TIMER_MODE mode, float duration, TimerManager.TimerManagerCountHandlerArgs handler, params object[] args) { if (string.IsNullOrEmpty(key)) { return(false); } if (duration < 0f) { return(false); } TimerManager.Timer timer = new TimerManager.Timer(key, mode, Time.realtimeSinceStartup, duration, handler, args); if (TimerManager.m_AddTimerList.ContainsKey(key)) { TimerManager.m_AddTimerList[key] = timer; } else { TimerManager.m_AddTimerList.Add(key, timer); } return(true); }