static void Main() { using (var game = new MainGameClass()) { game.IsMouseVisible = true; game.Run(); } }
public void Update(GameTime gameTime, MainGameClass game) { InputManager.Instance.Update(gameTime); if (GamePad.GetState(PlayerIndex.One).Buttons.Back == Microsoft.Xna.Framework.Input.ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { game.Exit(); } if (Keyboard.GetState().IsKeyDown(Keys.Space)) { SimulationManager.Instance.GetCurrentSimulation().Stop(); } if (Keyboard.GetState().IsKeyDown(Keys.LeftControl)) { SimulationManager.Instance.GetCurrentSimulation().Start(); } ScreenManager.Instance.CurrentScreen.Update(gameTime); }