public void Apply(InputState state, IInputStateChangeHandler handler)
        {
            var mouse = state.Mouse;

            if (mouse.IsPositionValid && Delta != Vector2.Zero)
            {
                mouse.LastPosition = mouse.Position;
                mouse.Position    += Delta;
                handler.HandleMousePositionChange(state);
            }
        }
Esempio n. 2
0
        public void Apply(InputState state, IInputStateChangeHandler handler)
        {
            var mouse = state.Mouse;

            if (!mouse.IsPositionValid || mouse.Position != Position)
            {
                mouse.IsPositionValid = true;
                mouse.LastPosition    = mouse.Position;
                mouse.Position        = Position;
                handler.HandleMousePositionChange(state);
            }
        }