示例#1
0
 public KeyInput(KeyCode newKeyCode, KeyStateEnum newKeyState, CheckingModeEnum newCheckingKeyMode, System.Action newOnKeyAction, OccurrenceModeEnum newOccurrenceMode = OccurrenceModeEnum.KEY_HAS_OCCUR)
 {
     KeyCodes.Add(newKeyCode);
     KeyState        = newKeyState;
     CheckingKeyMode = newCheckingKeyMode;
     OnKeyAction     = newOnKeyAction;
     OccurrenceMode  = newOccurrenceMode;
 }
 public void AddKeyCodes(KeyCode[] keycodes)
 {
     foreach (KeyCode keycode in keycodes)
     {
         if (!KeyCodes.Contains(keycode))
         {
             KeyCodes.Add(keycode);
         }
     }
 }
示例#3
0
 public void AddKeyCode(int keyCode, bool addIfNew)
 {
     if (addIfNew)
     {
         KeyCodes.AddIfNew(keyCode);
     }
     else
     {
         KeyCodes.Add(keyCode);
     }
 }