예제 #1
0
    public void Update()
    {
        if (!_valid)
        {
            return;
        }

        try
        {
            _selectionHistoryManager.Update();

            _analogHandler.Update();
            _globalCommands.Update();

            // Don't waste resources
            // Do not listen while a keybinding is being recorded
            if (_ui.isRecording)
            {
                return;
            }
            // Process based on the mode
            _currentModeHandler.OnKeyDown();
        }
        catch (Exception e)
        {
            SuperController.LogError($"{nameof(Keybindings)}.{nameof(Update)}: {e}");
        }
    }