示例#1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public OptionsMenuScreen()
            : base("Options")
        {
            // Create our menu entries.
            ungulateMenuEntry = new MenuEntry(string.Empty);
            languageMenuEntry = new MenuEntry(string.Empty);
            frobnicateMenuEntry = new MenuEntry(string.Empty);
            elfMenuEntry = new MenuEntry(string.Empty);

            SetMenuEntryText();

            MenuEntry back = new MenuEntry("Back");

            // Hook up menu event handlers.
            ungulateMenuEntry.Selected += UngulateMenuEntrySelected;
            languageMenuEntry.Selected += LanguageMenuEntrySelected;
            frobnicateMenuEntry.Selected += FrobnicateMenuEntrySelected;
            elfMenuEntry.Selected += ElfMenuEntrySelected;
            back.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(ungulateMenuEntry);
            MenuEntries.Add(languageMenuEntry);
            MenuEntries.Add(frobnicateMenuEntry);
            MenuEntries.Add(elfMenuEntry);
            MenuEntries.Add(back);
        }
示例#2
0
        public EndingScreen(Game game)
            : base("")
        {
            this.game = game;

            screenManager = (ScreenManager)game.Services.GetService(typeof(ScreenManager));
            MenuEntry exit = new MenuEntry("Exit Game");

            exit.Selected += ExitSelected;

            MenuEntries.Add(exit);
        }
示例#3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public PauseMenuScreen()
            : base("Paused")
        {
            // Create our menu entries.
            MenuEntry resumeGameMenuEntry = new MenuEntry("Resume Game");
            MenuEntry quitGameMenuEntry = new MenuEntry("Quit Game");

            // Hook up menu event handlers.
            resumeGameMenuEntry.Selected += OnCancel;
            quitGameMenuEntry.Selected += QuitGameMenuEntrySelected;

            // Add entries to the menu.
            MenuEntries.Add(resumeGameMenuEntry);
            MenuEntries.Add(quitGameMenuEntry);
        }
示例#4
0
        /// <summary>
        public MainMenuScreen(Game1 game)
            : base("Main Menu")
        {
            // Create our menu entries.
            MenuEntry playGameMenuEntry = new MenuEntry("Play Game");
            MenuEntry exitMenuEntry = new MenuEntry("Exit");
            this.game = game;

            // Hook up menu event handlers.
            playGameMenuEntry.Selected += PlayGameMenuEntrySelected;
            exitMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(playGameMenuEntry);
            MenuEntries.Add(exitMenuEntry);

            gameStateManager = (GameStateManager)game.Services.GetService(typeof(GameStateManager));
        }
示例#5
0
        public BuyScreen(Game game, Character character)
            : base("Hire a Mercenary")
        {
            cursor = (Cursor)game.Services.GetService(typeof(Cursor));
            playerManager = (PlayerManager)game.Services.GetService(typeof(PlayerManager));
            map = (BattleMap)game.Services.GetService(typeof(BattleMap));
            charList = (List<Character>)game.Services.GetService(typeof(List<Character>));
            screenManager = (ScreenManager)game.Services.GetService(typeof(ScreenManager));
            champion = character;
            this.game = game;

            MenuEntry buyKnight = new MenuEntry("Hire Knight, Cost: 100");
            MenuEntry buyRanger = new MenuEntry("Hire Ranger, Cost: 100");
            MenuEntry buyBarbarian = new MenuEntry("Hire Barbarian, Cost: 100");
            MenuEntry buyMage = new MenuEntry("Hire Mage, Cost: 150");
            MenuEntry buyPriest = new MenuEntry("Hire Spirit Priest, Cost: 150");
            MenuEntry cancel = new MenuEntry("Cancel");
            gameStateManager = (GameStateManager)game.Services.GetService(typeof(GameStateManager));

            gameStateManager.State = GameState.buying;
            // Hook up menu event handlers.
            buyKnight.Selected += buyKnightSelected;
            buyRanger.Selected += buyRangerSelected;
            buyBarbarian.Selected += buyBarbarianSelected;
            buyMage.Selected += buyMageSelected;
            buyPriest.Selected += buyPriestSelected;
            cancel.Selected += cancelSelected;

            // Add entries to the menu.
            MenuEntries.Add(buyKnight);
            MenuEntries.Add(buyRanger);
            MenuEntries.Add(buyBarbarian);
            MenuEntries.Add(buyMage);
            MenuEntries.Add(buyPriest);
            MenuEntries.Add(cancel);

            /*if (aiFlag == true)
            {
                BuyRandom();
            }*/
        }