protected override void Update(GameTime gameTime) { // Getting input device states keyboardState = keyboardManager.GetState(); mouseState = mouseManager.GetState(); if (keyboardState.IsKeyDown(Keys.Escape)) { this.Exit(); } model.Update(gameTime); camera.Update(gameTime); // Handle base.Update base.Update(gameTime); }
protected override void Update(GameTime gameTime) { keyboardState = keyboardManager.GetState(); mouseState = mouseManager.GetState(); camera.Update(gameTime); model.Update(gameTime); // Resets mouse position so it can't go outside the window mouseManager.SetPosition(new Vector2(MOUSEX, MOUSEY)); // Escape key will exit game if (keyboardState.IsKeyDown(Keys.Escape)) { this.Exit(); } // Handle base.Update base.Update(gameTime); }