protected virtual void Update(GameTime gameTime) { // reset mouse to center of screen at each frame if user set it to invisible bool mouseIsAlwaysCentered = !IsMouseVisible && IsActive; var center = new Point(Window.ClientBounds.Width / 2, Window.ClientBounds.Height / 2); MouseManager = MouseManager.GetCurrentState(MouseManager, center); if (mouseIsAlwaysCentered) { // reset the invisible mouse so it is always center Mouse.SetPosition(center.X, center.Y); } KeyboardManager = KeyboardManager.GetCurrentState(KeyboardManager); foreach (var component in _components) { component.Update(KeyboardManager, MouseManager, gameTime); } }