コード例 #1
0
        private void WindowOnKeyPressed(object sender, KeyEventArgs e)
        {
            if (e.Code == Keyboard.Key.C)
            {
                observeTarget = true;
                Audios.Wizard_Union_Selected();
                ToggleTargetObserving?.Invoke(this, true);
            }

            if (e.Code == Keyboard.Key.D)
            {
                showDebugInfo = !showDebugInfo;
            }

            if (e.Code == Keyboard.Key.F)
            {
                showDebugInfo = !showDebugInfo;
                showHealth    = showDebugInfo;
                showMinimap   = showDebugInfo;
                showWayPoints = showDebugInfo;
                // ForceSmooth = showDebugInfo;
            }

            if (e.Code == Keyboard.Key.H)
            {
                showHealth = !showHealth;
            }

            if (e.Code == Keyboard.Key.A)
            {
                if (Audios.EnabledAudio)
                {
                    Audios.DisableAudio();
                }
                Audios.EnabledAudio = !Audios.EnabledAudio;
                ToggleAudio?.Invoke(this, Audios.EnabledAudio);
            }

            if (e.Code == Keyboard.Key.M)
            {
                showMinimap = !showMinimap;
            }

            if (e.Code == Keyboard.Key.W)
            {
                showWayPoints = !showWayPoints;
            }

            if (e.Code == Keyboard.Key.S)
            {
                ForceSmooth = !ForceSmooth;
                if (ForceSmooth)
                {
                    Audios.EnableSmooth();
                }
            }
        }