static public bool GetKeybindKeysArePressed(Keybind pKeybind) { bool yes = false; bool allPressed = true; for (int i = 0; i < pKeybind.keycodes.Length; i++) { if (pKeybind.keysPressed[i]) { yes = true; } else { allPressed = false; } } return(yes && ((pKeybind.allKeysAtOnce) ? allPressed : true)); }
static public void UnsubscribeFromKeyup(string keybindName, UnityAction callback) { Keybind keybind = GetKeybindByName(keybindName); keybind.OnKeyUp.RemoveListener(callback); }
static public void SubscribeToKeyup(string keybindName, UnityAction callback) { Keybind keybind = GetKeybindByName(keybindName); keybind.OnKeyUp.AddListener(callback); }