Пример #1
0
        internal override void Update(float deltaTime)
        {
            UpdateTimer(deltaTime);

            for (int i = 0, max = mGameTimer.Count; i < max; ++i)
            {
                TimerBase tmpTimer = mGameTimer[i];
                if (tmpTimer.IsStart)
                {
                    tmpTimer.InternalUpdate(deltaTime);
                }
            }
        }
Пример #2
0
        public T FindTimer <T>() where T : TimerBase
        {
            for (int i = 0, max = mGameTimer.Count; i < max; ++i)
            {
                TimerBase tmpTimer = mGameTimer[i];

                if (tmpTimer.GetType() == typeof(T))
                {
                    return(tmpTimer as T);
                }
            }

            return(default(T));
        }