コード例 #1
0
        private static void MainWindow_MouseButtonPressed(object sender, MouseButtonEventArgs e)
        {
            switch (windowModeNow)
            {
            case WindowMode.Game:
            {
                levelNow.MainCharacter.gunNow.MainCharShoot(Program.levelNow.MainCharacter, new Point(e.X, e.Y));
                return;
            }

            case WindowMode.Dead:
            {
                DeadScreen.Click();
                return;
            }

            case WindowMode.Menu:
            {
                switch (MainMenuChooseNow)
                {
                case MainMenuChoose.Exit:
                {
                    MainWindow_Closed(new object(), new EventArgs());
                    return;
                }

                case MainMenuChoose.Story:
                {
                    windowModeNow = WindowMode.LevelsChoose;
                    return;
                }

                case MainMenuChoose.Arena:
                {
                    levelNow = new Arena();
                    levelNow = levelNow.RestartLevel();
                    levelNow.LoadStuff();
                    windowModeNow = WindowMode.Game;
                    return;
                }
                }
                return;
            }

            case WindowMode.LevelsChoose:
            {
                LevelChoosePage.Click();
                return;
            }

            case WindowMode.Pause:
            {
                DeadScreen.Click();
                return;
            }

            case WindowMode.Win:
            {
                WinScreen.Click();
                return;
            }
            }
        }