public override void Update(GameTime gameTime) { base.Update(gameTime); if (Active) { LeftButton.Update(gameTime); RightButton.Update(gameTime); } }
public override void Update(GameTime gameTime) { base.Update(gameTime); var currentState = Mouse.GetState(); LeftButton.Update(currentState.LeftButton); RightButton.Update(currentState.RightButton); MiddleButton.Update(currentState.MiddleButton); var newPoint = new Point(currentState.X, currentState.Y); if (!newPoint.Equals(lastPosition)) { MouseMove(newPoint); lastPosition = newPoint; } }