Example #1
0
        protected void _CalcStage2()
        {
            if (_data.Air2 == null)
            {
                return;
            }
            Random random = new Random();

            if (_planes_f.Count > 0)
            {
                int lost = Stage2_LostCount_f;
                while (lost > 0)
                {
                    List <PlaneModelBase> list = _planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0);
                    if (list.Count > 0)
                    {
                        PlaneModelBase planeModelBase = list[random.Next(list.Count)];
                        planeModelBase.SetStage2Lost(ref lost);
                    }
                }
            }
            if (_planes_e.Count > 0)
            {
                int lost2 = Stage2_LostCount_e;
                while (lost2 > 0)
                {
                    List <PlaneModelBase> list2 = _planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0);
                    if (list2.Count > 0)
                    {
                        PlaneModelBase planeModelBase2 = list2[random.Next(list2.Count)];
                        planeModelBase2.SetStage2Lost(ref lost2);
                    }
                }
            }
            if (_data.Air2.F_AntiFire != null)
            {
                AirFireInfo info = _data.Air2.F_AntiFire;
                _taiku_ship_f      = _ships_f.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__();
                _taiku_slotitems_f = new List <SlotitemModel_Battle>();
                for (int i = 0; i < info.UseItems.Count; i++)
                {
                    _taiku_slotitems_f.Add(new SlotitemModel_Battle(info.UseItems[i]));
                }
            }
            if (_data.Air2.E_AntiFire != null)
            {
                AirFireInfo info2 = _data.Air2.E_AntiFire;
                _taiku_ship_e      = _ships_e.Find((ShipModel_BattleAll ship) => ship.TmpId == info2.AttackerId).__CreateAttacker__();
                _taiku_slotitems_e = new List <SlotitemModel_Battle>();
                for (int j = 0; j < info2.UseItems.Count; j++)
                {
                    _taiku_slotitems_e.Add(new SlotitemModel_Battle(info2.UseItems[j]));
                }
            }
        }
        protected void _CalcStage2()
        {
            if (this._data.Air2 == null)
            {
                return;
            }
            Random random = new Random();

            if (this._planes_f.get_Count() > 0)
            {
                int i = this.Stage2_LostCount_f;
                while (i > 0)
                {
                    List <PlaneModelBase> list = this._planes_f.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0);
                    if (list.get_Count() > 0)
                    {
                        PlaneModelBase planeModelBase = list.get_Item(random.Next(list.get_Count()));
                        planeModelBase.SetStage2Lost(ref i);
                    }
                }
            }
            if (this._planes_e.get_Count() > 0)
            {
                int j = this.Stage2_LostCount_e;
                while (j > 0)
                {
                    List <PlaneModelBase> list2 = this._planes_e.FindAll((PlaneModelBase plane) => plane.Power_Stage2End > 0);
                    if (list2.get_Count() > 0)
                    {
                        PlaneModelBase planeModelBase2 = list2.get_Item(random.Next(list2.get_Count()));
                        planeModelBase2.SetStage2Lost(ref j);
                    }
                }
            }
            if (this._data.Air2.F_AntiFire != null)
            {
                AirFireInfo info = this._data.Air2.F_AntiFire;
                this._taiku_ship_f      = this._ships_f.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__();
                this._taiku_slotitems_f = new List <SlotitemModel_Battle>();
                for (int k = 0; k < info.UseItems.get_Count(); k++)
                {
                    this._taiku_slotitems_f.Add(new SlotitemModel_Battle(info.UseItems.get_Item(k)));
                }
            }
            if (this._data.Air2.E_AntiFire != null)
            {
                AirFireInfo info = this._data.Air2.E_AntiFire;
                this._taiku_ship_e      = this._ships_e.Find((ShipModel_BattleAll ship) => ship.TmpId == info.AttackerId).__CreateAttacker__();
                this._taiku_slotitems_e = new List <SlotitemModel_Battle>();
                for (int l = 0; l < info.UseItems.get_Count(); l++)
                {
                    this._taiku_slotitems_e.Add(new SlotitemModel_Battle(info.UseItems.get_Item(l)));
                }
            }
        }