예제 #1
0
    /// <summary>
    /// Ensures the timer routine is stopped and then resets it
    /// Timer gets stated by the AIManager or the unit that called it
    /// </summary>
    /// <param name="timer"></param>
    protected virtual void ResetTimer(CoolDownTimer timer)
    {
        if (timer.IsRunning)
        {
            AIManager.instance.PauseTimer(timer);
        }

        timer.ResetTimer();
        AIManager.instance.ResumeTimer(timer);
    }