Esempio n. 1
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (Active)
            {
                LeftButton.Update(gameTime);
                RightButton.Update(gameTime);
            }
        }
Esempio n. 2
0
        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;
            }
        }