Exemplo n.º 1
0
        public MainMenuScreen(bool isContinue, bool isNewGame)
            : base("Main Menu Screen")
        {
            if (!isContinue && !isNewGame)
            {
                startMenuEntry = new MenuEntry("Start");
                helpMenuEntry = new MenuEntry("Help");
                exitMenuEntry = new MenuEntry("Exit");

                startMenuEntry.Selected += StartMenuEntrySelected;
                helpMenuEntry.Selected += HelpMenuEntrySelected;
                exitMenuEntry.Selected += ExitMenuEntrySelected;

                MenuEntries.Add(startMenuEntry);
                MenuEntries.Add(helpMenuEntry);
                MenuEntries.Add(exitMenuEntry);
            }
            else if (isContinue && isNewGame)
            {
                continueMenuEntry = new MenuEntry("Continue");
                newGameMenuEntry = new MenuEntry("New Game");

                continueMenuEntry.Selected += ContinueMenuEntrySelected;
                newGameMenuEntry.Selected += NewGameMenuEntrySelected;

                MenuEntries.Add(continueMenuEntry);
                MenuEntries.Add(newGameMenuEntry);
            }
            else if (!isContinue && isNewGame)
            {
                newGameMenuEntry = new MenuEntry("New Game");

                newGameMenuEntry.Selected += NewGameMenuEntrySelected;

                MenuEntries.Add(newGameMenuEntry);
            }
        }
        public PauseMenuScreen(int currentScore, int currentLevel, int currentCheckPoint, string levelName)
            : base("Paused: " + levelName)
        {
            score = currentScore;
            level = currentLevel;
            checkPoint = currentCheckPoint;

            IsPopup = true;

            resumeGameMenuEntry = new MenuEntry("Resume Game");
            controlsGameMenuEntry = new MenuEntry("How to Play");
            optionsGameMenuEntry = new MenuEntry("Options");
            quitGameMenuEntry = new MenuEntry("Quit Game");

            resumeGameMenuEntry.Selected += ResumeGameMenuEntrySelected;
            controlsGameMenuEntry.Selected += ControlsGameMenuEntrySelected;
            optionsGameMenuEntry.Selected += OptionsGameMenuEntrySelected;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(controlsGameMenuEntry);
            MenuEntries.Add(optionsGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }