Ejemplo n.º 1
0
        public static void UpdateForward(GameTime gameTime)
        {
            float seconds = gameTime.getSeconds();

            secsSinceLastRetroPort += seconds;

            History history = new History();

            foreach (IReversible reversible in registeredReversibles)
            {
                history.mementos[reversible] = reversible.GenerateMementoFromCurrentFrame();
            }
            history.retroGameMemento     = RetroGame.GenerateMementoFromCurrentFrame();
            history.riotGuardWallMemento = RiotGuardWall.GenerateMementoFromCurrentFrame();
            history.soundManagerMemento  = SoundManager.GenerateMementoFromCurrentFrame();
            histories.Enqueue(history);

            if (secsSinceLastRetroPort >= RETROPORT_BASE_SECS)
            {
                LastHistory = histories.Dequeue();
            }
            else
            {
                LastHistory = null;
            }
        }