Esempio n. 1
0
        static void Main(string[] args)
        {
            var gc = new GameController();

            gc.StartGame();

            Console.ReadLine();
        }
Esempio n. 2
0
        // '' <summary>
        // '' The main menu was clicked, perform the button's action.
        // '' </summary>
        // '' <param name="button">the button pressed</param>
        private static void PerformMainMenuAction(int button)
        {
            switch (button)
            {
            case MAIN_MENU_PLAY_BUTTON:
                GameController.StartGame();
                break;

            case MAIN_MENU_SETUP_BUTTON:
                GameController.AddNewState(GameState.AlteringSettings);
                break;

            case MAIN_MENU_TOP_SCORES_BUTTON:
                GameController.AddNewState(GameState.ViewingHighScores);
                break;

            case MAIN_MENU_QUIT_BUTTON:
                GameController.EndCurrentState();
                break;
            }
        }
Esempio n. 3
0
        // If the main menu was clicked, perform the button's action
        private static void PerformMainMenuAction(int button)
        {
            // CHECK Implement Case Statement
            switch (button)
            {
            case MAIN_MENU_PLAY_BUTTON:
                GameController.StartGame();
                break;

            case MAIN_MENU_SETUP_BUTTON:
                GameController.AddNewState(GameState.AlteringSettings);
                break;

            case MAIN_MENU_TOP_SCORES_BUTTON:
                GameController.AddNewState(GameState.ViewingHighScores);
                break;

            case MAIN_MENU_QUIT_BUTTON:
                GameController.AddNewState(GameState.Quitting);;
                break;

            case MAIN_MENU_SHIPS_BUTTON:
                GameController.AddNewState(GameState.AlteringShipSettings);
                break;

            case MAIN_MENU_MUTE_BUTTON:
                Audio.PauseMusic();
                break;

            case MAIN_MENU_UNMUTE_BUTTON:
                Audio.ResumeMusic();
                break;

            case MAIN_MENU_THEME_BUTTON:
                GameController.AddNewState(GameState.ChangingThemes);
                break;
            }
        }