public void Update(float secondsPassed) { m_totalSeconds += secondsPassed; this[TimerPriority.Always].Tick(); for (int index = 1; index < m_buckets.Length; ++index) { TimerBucket bucket = m_buckets[index]; while (bucket.m_LastUpdate + (double)bucket.Delay >= m_totalSeconds) { bucket.m_LastUpdate += bucket.m_LastUpdate + bucket.Delay - m_totalSeconds; bucket.Tick(); } } }
private void AddBucket(TimerPriority prio, float delay) { m_buckets[(int)prio] = new TimerBucket(prio, delay); }
void AddBucket(TimerPriority prio, float delay) { m_buckets[(int)prio] = new TimerBucket(prio, delay); }