Exemple #1
0
        public static JoystickPosition ToAbsoluteReverse(this RelativeJoystickPosition position)
        {
            // TODO: Find a better way to do this conversion that doesn't rely on magic
            var val = (int)position;

            return((JoystickPosition)(val < 6 ? (val + 3) % 6 : val));
        }
Exemple #2
0
 public RelativeInput(IEnumerable <Button> buttons, RelativeJoystickPosition joystickPosition)
 {
     this.Buttons          = new HashSet <Button>(buttons);
     this.JoystickPosition = joystickPosition;
 }
Exemple #3
0
 public static JoystickPosition ToAbsolute(this RelativeJoystickPosition position)
 {
     return((JoystickPosition)((int)position));
 }
Exemple #4
0
 public RelativeInput(RelativeJoystickPosition joystickPosition)
 {
     this.Buttons          = new HashSet <Button>();
     this.JoystickPosition = joystickPosition;
 }