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 GetKeyDown(KeyCode key) { if (key == KeyCode.None) { return(false); } return(m_inputModule.GetKeyDown(key)); }
public static bool GetKeyDown(KeyCode key) => m_inputModule.GetKeyDown(key);