Exemple #1
0
        private void OnKeyReleased(Object sender, KeyEventArgs e)
        {
            switch (e.Code)
            {
                case Keyboard.Key.Escape:
                {
                    if (StartMenu != null)
                        return;

                    if (Running)
                    {
                        PauseMenu = new PauseMenu(this);
                        Layer_GUI.AddChild(PauseMenu);
                    }
                    else if (PauseMenu != null)
                        Layer_GUI.RemoveChild(PauseMenu);

                    break;
                }
                case Keyboard.Key.F11: ToggleFullscreen(); break;

                // Testing
                case Keyboard.Key.F2:
                {
                    GraphicsMode = GraphicsMode == GRAPHICSMODE_NORMAL ? GRAPHICSMODE_BLUEPRINT : GRAPHICSMODE_NORMAL;
                    if (!Started)
                    {
                        if (StartMenu != null)
                            Layer_GUI.RemoveChild(StartMenu);
                        StartMenu = new StartMenu(this);
                        Layer_GUI.AddChild(StartMenu);
                    }
                    else
                        Reset();
                }
                break;

            #if DEBUG
                case Keyboard.Key.F3: DEBUG_MOUSE_CONTROLS = !DEBUG_MOUSE_CONTROLS; break;

                case Keyboard.Key.F5: Player.StartPowerup(Powerup.DOUBLE_EXPLOSION_RADIUS); break;
                case Keyboard.Key.F6: Player.StartPowerup(Powerup.AIM_SPEED_INCREASE); break;
                case Keyboard.Key.F7: Player.StartPowerup(Powerup.FREEZE_TIME); break;
                case Keyboard.Key.F8: Player.StartPowerup(Powerup.RED_HOT_BEACH); break;
                case Keyboard.Key.F9: Player.StartPowerup(Powerup.TRIPLE_CANNON); break;
                case Keyboard.Key.F10: Player.StartPowerup(Powerup.OCTUPLE_CANNON); break;
            #endif
            }
        }
Exemple #2
0
        private void OnKeyReleased(Object sender, KeyEventArgs e)
        {
            switch (e.Code)
            {
            case Keyboard.Key.Escape:
            {
                if (StartMenu != null)
                {
                    return;
                }

                if (Running)
                {
                    PauseMenu = new PauseMenu(this);
                    Layer_GUI.AddChild(PauseMenu);
                }
                else if (PauseMenu != null)
                {
                    Layer_GUI.RemoveChild(PauseMenu);
                }

                break;
            }

            case Keyboard.Key.F11: ToggleFullscreen(); break;

            // Testing
            case Keyboard.Key.F2:
            {
                GraphicsMode = GraphicsMode == GRAPHICSMODE_NORMAL ? GRAPHICSMODE_BLUEPRINT : GRAPHICSMODE_NORMAL;
                if (!Started)
                {
                    if (StartMenu != null)
                    {
                        Layer_GUI.RemoveChild(StartMenu);
                    }
                    StartMenu = new StartMenu(this);
                    Layer_GUI.AddChild(StartMenu);
                }
                else
                {
                    Reset();
                }
            }
            break;

#if DEBUG
            case Keyboard.Key.F3: DEBUG_MOUSE_CONTROLS = !DEBUG_MOUSE_CONTROLS; break;

            case Keyboard.Key.F5: Player.StartPowerup(Powerup.DOUBLE_EXPLOSION_RADIUS); break;

            case Keyboard.Key.F6: Player.StartPowerup(Powerup.AIM_SPEED_INCREASE); break;

            case Keyboard.Key.F7: Player.StartPowerup(Powerup.FREEZE_TIME); break;

            case Keyboard.Key.F8: Player.StartPowerup(Powerup.RED_HOT_BEACH); break;

            case Keyboard.Key.F9: Player.StartPowerup(Powerup.TRIPLE_CANNON); break;

            case Keyboard.Key.F10: Player.StartPowerup(Powerup.OCTUPLE_CANNON); break;
#endif
            }
        }