示例#1
0
        public static void PullFromMemento(TimerMemento pMemento, float currTime)
        {
            float elapsedTime = currTime - pMemento.mCurrTime;

            Debug.Assert(elapsedTime >= 0);

            TimerManager pMan = TimerManager.PrivGetInstance();

            Debug.Assert(pMan != null);
            pMan.BasePullFromMemento(pMemento);

            // update all of the times on the event chain
            TimeEvent pNode = (TimeEvent)pMan.BaseGetActive();

            while (pNode != null)
            {
                pNode.triggerTime += elapsedTime;
                pNode              = (TimeEvent)pNode.GetNext();
            }
        }