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); } } }
public void AddKeyCode(int keyCode, bool addIfNew) { if (addIfNew) { KeyCodes.AddIfNew(keyCode); } else { KeyCodes.Add(keyCode); } }