Ejemplo n.º 1
0
 protected void subSlotExp(SakutekiInfo targetInfo, BattleSearchValues serchKind)
 {
     if (serchKind == BattleSearchValues.Lost || serchKind == BattleSearchValues.Success_Lost)
     {
         Dictionary <int, int[]> slotExperience = F_Data.SlotExperience;
         foreach (KeyValuePair <Mem_ship, List <int> > item in targetInfo.LostTargetOnslot)
         {
             Mem_ship key = item.Key;
             foreach (int item2 in item.Value)
             {
                 if (key.Onslot[item2] > 0)
                 {
                     int    key2       = key.Slot[item2];
                     double num        = (serchKind != BattleSearchValues.Lost) ? 6.0 : 12.0;
                     double randDouble = Utils.GetRandDouble(0.0, num - 1.0, 1.0, 1);
                     int    num2       = slotExperience[key2][0];
                     int    num3       = num2 - (int)(num * 0.5 + randDouble * 0.05);
                     if (num3 < 0)
                     {
                         num3 = 0;
                     }
                     int num4 = num3 - num2;
                     slotExperience[key2][1] = slotExperience[key2][1] + num4;
                 }
             }
         }
     }
 }
        private void SetDetectionResult(BattleSearchValues iValues)
        {
            string arg = string.Empty;

            switch (iValues)
            {
            case BattleSearchValues.Success:
            case BattleSearchValues.Success_Lost:
            case BattleSearchValues.Found:
                arg = "成功";
                break;

            case BattleSearchValues.Lost:
            case BattleSearchValues.Faile:
            case BattleSearchValues.NotFound:
                arg = "失敗";
                break;
            }
            _strFrame.detectionResult.text = $"索敵結果[{arg}]";
        }
Ejemplo n.º 3
0
        private void SetDetectionResult(BattleSearchValues iValues)
        {
            string text = string.Empty;

            switch (iValues)
            {
            case BattleSearchValues.Success:
            case BattleSearchValues.Success_Lost:
            case BattleSearchValues.Found:
                text = "成功";
                break;

            case BattleSearchValues.Lost:
            case BattleSearchValues.Faile:
            case BattleSearchValues.NotFound:
                text = "失敗";
                break;
            }
            this._strFrame.detectionResult.text = string.Format("索敵結果[{0}]", text);
        }
        protected void subSlotExp(SakutekiInfo targetInfo, BattleSearchValues serchKind)
        {
            if (serchKind != BattleSearchValues.Lost && serchKind != BattleSearchValues.Success_Lost)
            {
                return;
            }
            Dictionary <int, int[]> slotExperience = this.F_Data.SlotExperience;

            using (Dictionary <Mem_ship, List <int> > .Enumerator enumerator = targetInfo.LostTargetOnslot.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <Mem_ship, List <int> > current = enumerator.get_Current();
                    Mem_ship key = current.get_Key();
                    using (List <int> .Enumerator enumerator2 = current.get_Value().GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            int current2 = enumerator2.get_Current();
                            if (key.Onslot.get_Item(current2) > 0)
                            {
                                int    num        = key.Slot.get_Item(current2);
                                double num2       = (serchKind != BattleSearchValues.Lost) ? 6.0 : 12.0;
                                double randDouble = Utils.GetRandDouble(0.0, num2 - 1.0, 1.0, 1);
                                int    num3       = slotExperience.get_Item(num)[0];
                                int    num4       = num3 - (int)(num2 * 0.5 + randDouble * 0.05);
                                if (num4 < 0)
                                {
                                    num4 = 0;
                                }
                                int num5 = num4 - num3;
                                slotExperience.get_Item(num)[1] = slotExperience.get_Item(num)[1] + num5;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
0
 private bool _ExistLost(BattleSearchValues value)
 {
     return(value == BattleSearchValues.Success_Lost || value == BattleSearchValues.Lost);
 }
Ejemplo n.º 6
0
 private bool _HasPlane(BattleSearchValues value)
 {
     return(value == BattleSearchValues.Success || value == BattleSearchValues.Success_Lost || value == BattleSearchValues.Lost || value == BattleSearchValues.Faile);
 }
Ejemplo n.º 7
0
 private bool _IsSuccess(BattleSearchValues value)
 {
     return(value == BattleSearchValues.Success || value == BattleSearchValues.Success_Lost || value == BattleSearchValues.Found);
 }