Beispiel #1
0
        internal void InitMenu(ScreenState state)
        {
            BattleMenu = new BattleMenu(this, state);

            if (BattleMenu.WMagic)
            {
                MagicMenu = new Screens.Magic.WMagic(this, MagicSpells, state);
            }
            else
            {
                MagicMenu = new Screens.Magic.Main(this, MagicSpells, state);
            }

            if (!MagicMenu.IsValid)
            {
                MagicMenu = null;
            }

            if (BattleMenu.WSummon)
            {
                SummonMenu = new Screens.Summon.WSummon(CurrentBattle, Summons, state);
            }
            else
            {
                SummonMenu = new Screens.Summon.Main(CurrentBattle, Summons, state);
            }

            if (!SummonMenu.IsValid)
            {
                SummonMenu = null;
            }

            IEnumerable <EnemySkillMateria> esms = Materia.Where(x => x is EnemySkillMateria).Cast <EnemySkillMateria>();

            if (esms.Count() > 0)
            {
                EnemySkillMateria m = EnemySkillMateria.Merge(esms);

                if (m.AP > 0)
                {
                    EnemySkillMenu = new Screens.EnemySkill.Main(CurrentBattle, m, state);
                }
            }
        }
Beispiel #2
0
        internal void InitMenu(ScreenState state)
        {
            BattleMenu = new BattleMenu(this, state);

            if (BattleMenu.WMagic)
            {
                MagicMenu = new Screens.Magic.WMagic(this, MagicSpells, state);
            }
            else
            {
                MagicMenu = new Screens.Magic.Main(this, MagicSpells, state);
            }

            if (!MagicMenu.IsValid)
            {
                MagicMenu = null;
            }

            if (BattleMenu.WSummon)
            {
                SummonMenu = new Screens.Summon.WSummon(CurrentBattle, Summons, state);
            }
            else
            {
                SummonMenu = new Screens.Summon.Main(CurrentBattle, Summons, state);
            }

            if (!SummonMenu.IsValid)
            {
                SummonMenu = null;
            }

            IEnumerable<EnemySkillMateria> esms = Materia.Where(x => x is EnemySkillMateria).Cast<EnemySkillMateria>();

            if (esms.Count() > 0)
            {
                EnemySkillMateria m = EnemySkillMateria.Merge(esms);

                if (m.AP > 0)
                {
                    EnemySkillMenu = new Screens.EnemySkill.Main(CurrentBattle, m, state);
                }
            }
        }