private static void Update(GameTime time) { Render(); currentState.Update(); UserInterfaceInput.HandleKeys(); musicHandler.Update(); }
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); } }