예제 #1
0
 private static void Update(GameTime time)
 {
     Render();
     currentState.Update();
     UserInterfaceInput.HandleKeys();
     musicHandler.Update();
 }
예제 #2
0
        private static void Update(GameTime time)
        {
            bool cooldownReached = DateTime.Now - lastUpdate > updateTimeSpan;

            if (cooldownReached)
            {
                Render();
                currentState.Update();
                UserInterfaceInput.HandleKeys();
                musicHandler.Update();
            }

            if (currentState is Play && !(console.Children.Contains(msgConsole.Console) && console.Children.Contains(GUI.Console)))
            {
                console.Children.Remove(msgConsole.Console);
                console.Children.Remove(GUI.Console);
                console.Children.Add(msgConsole.Console);
                console.Children.Add(GUI.Console);
            }
        }