/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { MouseState mouse = Mouse.GetState(); //DEBUG if (mouse.RightButton == ButtonState.Pressed) { mouseClickRectangle.X = mouse.X - mouseClickRectangle.Width / 2; mouseClickRectangle.Y = mouse.Y - mouseClickRectangle.Height / 2; } // switch (CurrentGameState) { case GameState.StartMenu: startMenu.Update(mouse); break; default: firstPlayer.handleInput(); targetSelection.RunTarget(); TestSelect.Run(mouse); SystemManager.Run(gameTime); break; } EntityCleaner.Run(); base.Update(gameTime); }