void CheckKeyboardInput()
    {
        if (!UIManager.IsInputFocus && GameData.IsInGame && CustomNetworkManager.Instance.IsClientConnected())
        {
            // Perform escape key action
            if (CommonInput.GetKeyDown(KeyCode.Escape))
            {
                EscapeKeyTarget.HandleEscapeKey();
            }

            // Perform the checks for all key actions which have functions defined here
            foreach (KeyValuePair <KeyAction, DualKeyCombo> entry in keybindManager.userKeybinds)
            {
                if (!keyActionFunctions.ContainsKey(entry.Key))
                {
                    continue;
                }
                if (CheckComboEvent(entry.Value.PrimaryCombo) || CheckComboEvent(entry.Value.SecondaryCombo))
                {
                    // Call the function associated with the KeyAction enum
                    keyActionFunctions[entry.Key]();
                }
            }
        }
    }
    void CheckKeyboardInput()
    {
        if (!UIManager.IsInputFocus)
        {
            // Perform escape key action
            if (CommonInput.GetKeyDown(KeyCode.Escape))
            {
                EscapeKeyTarget.HandleEscapeKey();
            }

            // Only check for keyboard input once in-game
            if (GameData.IsInGame && Mirror.NetworkClient.active)
            {
                CheckInGameKeybinds();
            }
        }
    }
Esempio n. 3
0
    void CheckKeyboardInput()
    {
        if (!UIManager.IsInputFocus)
        {
            // Perform escape key action
            if (CommonInput.GetKeyDown(KeyCode.Escape))
            {
                EscapeKeyTarget.HandleEscapeKey();
            }

            // Only check for keyboard input once in-game
            if (GameData.IsInGame && CustomNetworkManager.Instance.IsClientConnected())
            {
                CheckInGameKeybinds();
            }
        }
    }