static void Main2(string[] args) { using (TerrainMap game = new TerrainMap()) { game.Run(); } }
/* * /// <summary> * /// UnloadContent will be called once per game and is the place to unload * /// all content. * /// </summary> * protected override void UnloadContent() { * // TODO: Unload any non ContentManager content here * } */ /// <summary> /// Process user keyboard input. /// Pressing 'T' or 't' will toggle the display between the height and color textures /// </summary> protected override void Update(GameTime gameTime) { KeyboardState keyboardState = Keyboard.GetState(); if (keyboardState.IsKeyDown(Keys.Escape)) { Exit(); } else if (Keyboard.GetState().IsKeyDown(Keys.T) && !oldState.IsKeyDown(Keys.T)) { showHeight = !showHeight; } if (keyboardState.IsKeyDown(Keys.Q) && !oldKeyboardState.IsKeyDown(Keys.Q)) { using (var game = new TerrainMap()) game.Run(); } oldKeyboardState = keyboardState; oldState = keyboardState; // Update saved state. base.Update(gameTime); }
static void Main() { using (var game = new TerrainMap()) game.Run(); }