Beispiel #1
0
 /// <summary>
 /// Assignes a method that check the state of the axis
 /// </summary>
 private void AssignCheckMethod()
 {
     switch (_axisEvent)
     {
         case AxisEventType.IsInactive:
             _checkMethod = IsInactive;
             break;
         case AxisEventType.IsActive:
             _checkMethod = IsActive;
             break;
         default:
             throw new Exception("Invalid command event code provided");
     }
 }
Beispiel #2
0
 /// <summary>
 /// Assignes a method that check the state of the button for a specific event
 /// </summary>
 private void AssignCheckMethod()
 {
     switch (_buttonEvent)
     {
         case ButtonEventType.IsPressed:
             _checkMethod = IsPressed;
             break;
         case ButtonEventType.IsReleased:
             _checkMethod = IsReleased;
             break;
         case ButtonEventType.IsDown:
             _checkMethod = IsDown;
             break;
         case ButtonEventType.IsUp:
             _checkMethod = IsUp;
             break;
         default:
             throw new Exception("Invalid command event code provided");
     }
 }