private List <ISpellswordCommand> GetMenuCommands(MenuScene scene, Menu mainMenu, Player player)
        {
            List <ISpellswordCommand> menuCommands         = new List <ISpellswordCommand>();
            EquipmentMenu             equipmentMenu        = new EquipmentMenu(this, player);
            SwitchMenuCommand         equipmentMenuCommand = new SwitchMenuCommand("Equipment", this, mainMenu, equipmentMenu);

            menuCommands.Add(equipmentMenuCommand);

            TalentMenu        talentMenu        = new TalentMenu(this, player);
            SwitchMenuCommand talentMenuCommand = new SwitchMenuCommand("Talents", this, mainMenu, talentMenu);

            menuCommands.Add(talentMenuCommand);

            StatusMenu        statusMenu        = new StatusMenu(this, player);
            SwitchMenuCommand statusMenuCommand = new SwitchMenuCommand("Player Status", this, mainMenu, statusMenu);

            menuCommands.Add(statusMenuCommand);

            SpellMenu         spellMenu        = new SpellMenu(this, player);
            SwitchMenuCommand spellMenuCommand = new SwitchMenuCommand("Current Spells", this, mainMenu, spellMenu);

            menuCommands.Add(spellMenuCommand);

            return(menuCommands);
        }
        public void OpenMenu(Player player)
        {
            MainMenu menu = new MainMenu(this, menuScene);

            menu.AddCommands(GetMenuCommands(menuScene, menu, player));
            menuScene         = new MenuScene(this, menu);
            this.CurrentState = GameState.MainMenu;
        }
 public void SwitchOutMenu(Menu newMenu)
 {
     if (newMenu is BattleMenu)
     {
         battleScene.SetBattleMenu((BattleMenu)newMenu);
     }
     else
     {
         menuScene = new MenuScene(this, newMenu);
     }
 }
        protected override void Initialize()
        {
            base.Initialize();
            this.CurrentState = GameState.World;
            SwitchSong();
            Point         gameSize  = new Point(17, 23);
            World         gameWorld = new World(gameSize, Content.Load <Texture2D>("BaseTile"));
            WalkingPlayer player    = new WalkingPlayer(this, gameWorld);

            walkingScene = new WalkingScene(this, gameWorld, player);
            battleScene  = null;
            menuScene    = null;
        }
Exemple #5
0
 public MainMenu(SpellswordGame game, MenuScene scene) : this(game, new List <ISpellswordCommand>())
 {
 }