public CTimer(int time, int loop, CTimer.OnTimeUpWithParamsHandler timeUpWithParamsHandler, int sequence, stTimerParams timerParams) { if (loop == 0) { loop = -1; } this.m_totalTime = time; this.m_loop = loop; this.m_timeUpWithParamsHandler = timeUpWithParamsHandler; this.m_sequence = sequence; this.m_timerParams = timerParams; this.m_currentTime = 0; this.m_isRunning = true; this.m_isFinished = false; }
public int AddTimer(int time, int loop, CTimer.OnTimeUpWithParamsHandler onTimeUpWithParamsHandler, bool useFrameSync, stTimerParams timerParams) { this.m_timerSequence++; this.m_timers[useFrameSync ? 1 : 0].Add(new CTimer(time, loop, onTimeUpWithParamsHandler, this.m_timerSequence, timerParams)); return(this.m_timerSequence); }
public int AddTimer(int time, int loop, CTimer.OnTimeUpWithParamsHandler onTimeUpWithParamsHandler, stTimerParams timerParams) { return(this.AddTimer(time, loop, onTimeUpWithParamsHandler, false, timerParams)); }