protected virtual void OnPositionStop() { // Report the X,Y coordinates in relationship to the center fo the joystick JoystickPositionEventArgs args = new JoystickPositionEventArgs(); args.PositionX = 0; args.PositionY = 0; PositionStop?.Invoke(this, args); }
protected virtual void OnPositionChanged() { // Report the X,Y coordinates in relationship to the center fo the joystick JoystickPositionEventArgs args = new JoystickPositionEventArgs(); args.PositionX = ((int)_centerX - _positionX) * -1; args.PositionY = (int)_centerY - _positionY; PositionChanged?.Invoke(this, args); }