private void Update() { if (input.AnyKey) { anyKeyEvent?.Invoke(); } foreach (var entry in basicShortcuts) { var pressed = true; for (int i = 0; i < entry.Key.Length - 1; i++) { if (!input.GetKey(entry.Key[i])) { pressed = false; break; } } if (!pressed) { continue; } if (input.GetKeyDown(entry.Key[entry.Key.Length - 1])) { entry.Value?.Invoke(); } } }
public static bool GetKey(KeyCode key) { if (key == KeyCode.None) { return(false); } return(m_inputModule.GetKey(key)); }
public static bool GetKey(KeyCode key) => m_inputModule.GetKey(key);