Пример #1
0
 // Constructors
 public InputSelector(KeyCode kc)
 {
     inputKeyCode         = new InputSelectorKeyCode();
     inputSelection       = inputKeyCode;
     inputType            = InputType.KeyCode;
     inputKeyCode.keyCode = (int)kc;
 }
Пример #2
0
 /// <summary>
 /// Set the unused derived classes of InputSelectorBase to null to not waste memory on runtime startup
 /// </summary>
 private void NullUnusedTypes()
 {
     if (inputType != InputType.Axis)
     {
         inputAxis = null;
     }
     if (inputType != InputType.KeyCode)
     {
         inputKeyCode = null;
     }
     if (inputType != InputType.Keys)
     {
         inputKeys = null;
     }
     if (inputType != InputType.UIZone)
     {
         inputUIZone = null;
     }
     if (inputType != InputType.TouchArea)
     {
         inputTouchArea = null;
     }
 }