Ejemplo n.º 1
0
 public RationModel(List <ShipModel_BattleAll> ships_f, Dictionary <int, List <Mst_slotitem> > data)
 {
     _ships  = new List <ShipModel_Eater>();
     _shared = new List <ShipModel_Eater>();
     for (int i = 0; i < ships_f.Count; i++)
     {
         ShipModel_BattleAll shipModel_BattleAll = ships_f[i];
         if (shipModel_BattleAll == null || !data.ContainsKey(shipModel_BattleAll.TmpId))
         {
             continue;
         }
         ShipModel_Eater item = shipModel_BattleAll.__CreateEater__();
         if (i > 0)
         {
             ShipModel_Eater shipModel_Eater = _GetSharedShip(data, ships_f[i - 1]);
             if (shipModel_Eater != null)
             {
                 _shared.Add(shipModel_Eater);
             }
         }
         if (i < ships_f.Count - 1)
         {
             ShipModel_Eater shipModel_Eater2 = _GetSharedShip(data, ships_f[i + 1]);
             if (shipModel_Eater2 != null)
             {
                 _shared.Add(shipModel_Eater2);
             }
         }
         _ships.Add(item);
     }
     _ships.Distinct();
 }
        private List <DamageModelBase> _CreateRaigekiData(BakuRaiInfo Bakurai, List <ShipModel_BattleAll> ships)
        {
            List <DamageModelBase> list = new List <DamageModelBase>();

            for (int i = 0; i < ships.get_Count(); i++)
            {
                ShipModel_BattleAll shipModel_BattleAll = ships.get_Item(i);
                if (shipModel_BattleAll == null || Bakurai == null)
                {
                    list.Add(null);
                }
                else
                {
                    bool is_raigeki  = Bakurai.IsRaigeki[i];
                    bool is_bakugeki = Bakurai.IsBakugeki[i];
                    BakuRaiDamageModel bakuRaiDamageModel = new BakuRaiDamageModel(shipModel_BattleAll, is_raigeki, is_bakugeki);
                    int               damage   = Bakurai.Damage[i];
                    BattleHitStatus   hitstate = Bakurai.Clitical[i];
                    BattleDamageKinds dmgkind  = Bakurai.DamageType[i];
                    bakuRaiDamageModel.__AddData__(damage, hitstate, dmgkind);
                    list.Add(bakuRaiDamageModel);
                }
            }
            return(list);
        }
Ejemplo n.º 3
0
        private void _addProtectShip(Dictionary <int, UIBattleShip> attackers, Dictionary <int, UIBattleShip> defenders, FleetType defType)
        {
            bool is_friend = (defType == FleetType.Friend) ? true : false;

            ShipModel_BattleAll[] array = (defType != 0) ? BattleTaskManager.GetBattleManager().Ships_f : BattleTaskManager.GetBattleManager().Ships_e;
            int num = 0;
            ShipModel_Defender attackTo;

            while (true)
            {
                if (num >= attackers.Count)
                {
                    return;
                }
                ShipModel_BattleAll shipModel_BattleAll = array[num];
                attackTo = _clsRaigeki.GetAttackTo(shipModel_BattleAll);
                if (shipModel_BattleAll != null && attackTo != null)
                {
                    RaigekiDamageModel attackDamage = _clsRaigeki.GetAttackDamage(attackTo.Index, is_friend);
                    if (attackDamage.GetProtectEffect(shipModel_BattleAll.TmpId))
                    {
                        break;
                    }
                }
                num++;
            }
            _isProtect[(int)defType] = true;
            _torpedoProtect.AddShipList(defenders[0], defenders[attackTo.Index], defType);
        }
 public RationModel(List <ShipModel_BattleAll> ships_f, Dictionary <int, List <Mst_slotitem> > data)
 {
     this._ships  = new List <ShipModel_Eater>();
     this._shared = new List <ShipModel_Eater>();
     for (int i = 0; i < ships_f.get_Count(); i++)
     {
         ShipModel_BattleAll shipModel_BattleAll = ships_f.get_Item(i);
         if (shipModel_BattleAll != null && data.ContainsKey(shipModel_BattleAll.TmpId))
         {
             ShipModel_Eater shipModel_Eater = shipModel_BattleAll.__CreateEater__();
             if (i > 0)
             {
                 ShipModel_Eater shipModel_Eater2 = this._GetSharedShip(data, ships_f.get_Item(i - 1));
                 if (shipModel_Eater2 != null)
                 {
                     this._shared.Add(shipModel_Eater2);
                 }
             }
             if (i < ships_f.get_Count() - 1)
             {
                 ShipModel_Eater shipModel_Eater3 = this._GetSharedShip(data, ships_f.get_Item(i + 1));
                 if (shipModel_Eater3 != null)
                 {
                     this._shared.Add(shipModel_Eater3);
                 }
             }
             this._ships.Add(shipModel_Eater);
         }
     }
     Enumerable.Distinct <ShipModel_Eater>(this._ships);
 }
Ejemplo n.º 5
0
        public KoukuuModel(List <ShipModel_BattleAll> ships_f, List <ShipModel_BattleAll> ships_e, AirBattle data)
            : base(ships_f, ships_e, data)
        {
            _attackers_f = new List <ShipModel_Attacker>();
            int j;

            for (j = 0; j < _data.F_PlaneFrom.Count; j++)
            {
                ShipModel_BattleAll shipModel_BattleAll = _ships_f.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == _data.F_PlaneFrom[j]);
                if (shipModel_BattleAll != null)
                {
                    _attackers_f.Add(shipModel_BattleAll.__CreateAttacker__());
                }
            }
            _attackers_e = new List <ShipModel_Attacker>();
            int i;

            for (i = 0; i < _data.E_PlaneFrom.Count; i++)
            {
                ShipModel_BattleAll shipModel_BattleAll2 = _ships_e.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == _data.E_PlaneFrom[i]);
                if (shipModel_BattleAll2 != null)
                {
                    _attackers_e.Add(shipModel_BattleAll2.__CreateAttacker__());
                }
            }
            _Initialize();
        }
        private string ToString_Plane(List <ShipModel_BattleAll> ships)
        {
            string text = string.Empty;

            for (int i = 0; i < ships.get_Count(); i++)
            {
                ShipModel_BattleAll shipModel_BattleAll = ships.get_Item(i);
                if (shipModel_BattleAll != null)
                {
                    PlaneModelBase[] plane = this.GetPlane(shipModel_BattleAll.TmpId);
                    text += string.Format("[{0}]{1}:", i, shipModel_BattleAll.Name);
                    if (plane.Length == 0)
                    {
                        text += string.Format("航空機無し", new object[0]);
                    }
                    else
                    {
                        for (int j = 0; j < plane.Length; j++)
                        {
                            text += string.Format("({0}) ", plane[j]);
                        }
                    }
                    text += "\n";
                }
            }
            return(text);
        }
Ejemplo n.º 7
0
        private string ToString_Plane(List <ShipModel_BattleAll> ships)
        {
            string text = string.Empty;

            for (int i = 0; i < ships.Count; i++)
            {
                ShipModel_BattleAll shipModel_BattleAll = ships[i];
                if (shipModel_BattleAll == null)
                {
                    continue;
                }
                PlaneModelBase[] plane = GetPlane(shipModel_BattleAll.TmpId);
                text += $"[{i}]{shipModel_BattleAll.Name}:";
                if (plane.Length == 0)
                {
                    text += $"航空機無し";
                }
                else
                {
                    for (int j = 0; j < plane.Length; j++)
                    {
                        text += $"({plane[j]}) ";
                    }
                }
                text += "\n";
            }
            return(text);
        }
 public ShipRecoveryType IsUseRecoverySlotitem(int ship_tmp_id, bool is_day)
 {
     if (is_day)
     {
         if (this._battleData.DayBattle == null || !this.GetCommandPhaseModel().IsTakeCommand())
         {
             return(ShipRecoveryType.None);
         }
         ShipModel_BattleAll ship = this.GetShip(ship_tmp_id);
         if (ship == null)
         {
             return(ShipRecoveryType.None);
         }
         return(ship.IsUseRecoverySlotitemAtFirstCombat());
     }
     else
     {
         if (this._battleData.NightBattle == null)
         {
             return(ShipRecoveryType.None);
         }
         ShipModel_BattleAll ship2 = this.GetShip(ship_tmp_id);
         if (ship2 == null)
         {
             return(ShipRecoveryType.None);
         }
         if (this._battleData.DayBattle == null)
         {
             return(ship2.IsUseRecoverySlotitemAtFirstCombat());
         }
         return(ship2.IsUseRecoverySlotitemAtSecondCombat());
     }
 }
Ejemplo n.º 9
0
        public override bool SendOffEscapes()
        {
            ShipModel[] escapeCandidate = base.GetEscapeCandidate();
            if (escapeCandidate.Length != 2)
            {
                return(false);
            }
            ShipModel escapeShip = escapeCandidate[1];
            ShipModel towShip    = escapeCandidate[0];

            if (escapeShip == null || towShip == null)
            {
                return(false);
            }
            bool flag = this._reqBattle.GoBackPort(escapeShip.MemId, towShip.MemId);

            if (flag)
            {
                ShipModel_BattleAll shipModel_BattleAll = this._ships_f.Find((ShipModel_BattleAll item) => item != null && item.TmpId == towShip.MemId);
                if (shipModel_BattleAll != null)
                {
                    shipModel_BattleAll.__UpdateEscapeStatus__(true);
                }
                ShipModel_BattleAll shipModel_BattleAll2 = this._ships_f.Find((ShipModel_BattleAll item) => item != null && item.TmpId == escapeShip.MemId);
                if (shipModel_BattleAll2 != null)
                {
                    shipModel_BattleAll2.__UpdateEscapeStatus__(true);
                }
            }
            return(flag);
        }
        private Dictionary <int, DamageModelBase> _CreateRaigekiDamageModel(List <ShipModel_BattleAll> a_ships, List <ShipModel_BattleAll> d_ships, List <DamageModelBase> data, RaigekiInfo rInfo)
        {
            Dictionary <int, DamageModelBase> dictionary = new Dictionary <int, DamageModelBase>();

            for (int i = 0; i < d_ships.get_Count(); i++)
            {
                ShipModel_BattleAll shipModel_BattleAll = d_ships.get_Item(i);
                if (shipModel_BattleAll != null)
                {
                    data.Add(new RaigekiDamageModel(shipModel_BattleAll));
                }
                else
                {
                    data.Add(null);
                }
            }
            for (int j = 0; j < rInfo.Target.Length; j++)
            {
                int num = rInfo.Target[j];
                if (num != -1)
                {
                    ShipModel_BattleAll shipModel_BattleAll2 = a_ships.get_Item(j);
                    DamageModelBase     damageModelBase      = data.get_Item(num);
                    if (damageModelBase == null)
                    {
                        ShipModel_BattleAll defender = d_ships.get_Item(num);
                        damageModelBase = new RaigekiDamageModel(defender);
                        data.set_Item(num, damageModelBase);
                    }
                    ((RaigekiDamageModel)damageModelBase).__AddData__(shipModel_BattleAll2, rInfo.Damage[j], rInfo.Clitical[j], rInfo.DamageKind[j]);
                    dictionary.set_Item(shipModel_BattleAll2.TmpId, damageModelBase);
                }
            }
            return(dictionary);
        }
Ejemplo n.º 11
0
 public ShienModel_Hou(DeckModel shien_deck, List <ShipModel_BattleAll> ships_f, List <ShipModel_BattleAll> ships_e, SupportAtack data)
 {
     _shien_deck_id = shien_deck.Id;
     _ships_shien   = new List <ShipModel_Attacker>();
     ShipModel[] ships = shien_deck.GetShips();
     for (int i = 0; i < ships.Length; i++)
     {
         _ships_shien.Add(new __ShipModel_Attacker__(ships[i], i));
     }
     _ships_f  = ships_f;
     _ships_e  = ships_e;
     _data     = data;
     _dmg_data = new List <DamageModel>();
     for (int j = 0; j < ships_e.Count; j++)
     {
         ShipModel_BattleAll shipModel_BattleAll = ships_e[j];
         if (shipModel_BattleAll == null)
         {
             _dmg_data.Add(null);
             continue;
         }
         DamageModel       damageModel = new DamageModel(shipModel_BattleAll);
         int               damage      = data.Hourai.Damage[j];
         BattleHitStatus   hitstate    = data.Hourai.Clitical[j];
         BattleDamageKinds dmgkind     = data.Hourai.DamageType[j];
         damageModel.__AddData__(damage, hitstate, dmgkind);
         damageModel.__CalcDamage__();
         _dmg_data.Add(damageModel);
     }
 }
        public KoukuuModel(List <ShipModel_BattleAll> ships_f, List <ShipModel_BattleAll> ships_e, AirBattle data) : base(ships_f, ships_e, data)
        {
            this._attackers_f = new List <ShipModel_Attacker>();
            int j;

            for (j = 0; j < this._data.F_PlaneFrom.get_Count(); j++)
            {
                ShipModel_BattleAll shipModel_BattleAll = this._ships_f.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == this._data.F_PlaneFrom.get_Item(j));
                if (shipModel_BattleAll != null)
                {
                    this._attackers_f.Add(shipModel_BattleAll.__CreateAttacker__());
                }
            }
            this._attackers_e = new List <ShipModel_Attacker>();
            int i;

            for (i = 0; i < this._data.E_PlaneFrom.get_Count(); i++)
            {
                ShipModel_BattleAll shipModel_BattleAll2 = this._ships_e.Find((ShipModel_BattleAll ship) => ship != null && ship.TmpId == this._data.E_PlaneFrom.get_Item(i));
                if (shipModel_BattleAll2 != null)
                {
                    this._attackers_e.Add(shipModel_BattleAll2.__CreateAttacker__());
                }
            }
            base._Initialize();
        }
Ejemplo n.º 13
0
        private void InitEnemyFleetInfos()
        {
            BattleManager battleManager = BattleCutManager.GetBattleManager();

            new BattleData();
            IEnumerable <ShipModel_BattleAll> source = from x in battleManager.Ships_e
                                                       where x != null
                                                       select x;
            int maxHP = (from x in source
                         select x.HpStart).Sum();
            int num = (from x in source
                       select x.HpPhaseStart).Sum();

            _uiEnemyFleetInfos.circleGauge.SetHPGauge(maxHP, num, num);
            for (int i = 0; i < 6; i++)
            {
                ShipModel_BattleAll shipModel_BattleAll = battleManager.Ships_e[i];
                _uiEnemyFleetInfos.hpBars.Add(((Component)_uiEnemyFleetInfos.shipHPBarAnchor.Find("EnemyHPBar" + (i + 1))).GetComponent <BtlCut_HPBar>());
                if (shipModel_BattleAll != null)
                {
                    _uiEnemyFleetInfos.hpBars[i].SetHpBar(shipModel_BattleAll);
                }
                else
                {
                    _uiEnemyFleetInfos.hpBars[i].Hide();
                }
            }
        }
Ejemplo n.º 14
0
 public DamageModelBase(ShipModel_BattleAll defender)
 {
     this._defender     = defender.__CreateDefender__();
     this._calc_damages = new List <int>();
     this._damages      = new List <int>();
     this._hitstates    = new List <BattleHitStatus>();
     this._dmgkind      = new List <BattleDamageKinds>();
 }
Ejemplo n.º 15
0
 private void OnDestroy()
 {
     Mem.Del(ref this._uiParticle);
     Mem.Del <UITexture>(ref this._uiShip);
     Mem.Del <Animation>(ref this._anime);
     this._keyControl = null;
     this._ship       = null;
 }
Ejemplo n.º 16
0
 private new void OnDestroy()
 {
     Mem.Del(ref _uiParticle);
     Mem.Del(ref _uiShip);
     Mem.Del(ref _anime);
     _keyControl = null;
     _ship       = null;
 }
 public NightCombatModel(BattleManager bManager, NightBattleFmt fmt, RationModel ration)
 {
     this._fmt           = fmt;
     this._flare_f       = bManager.GetShip(this._fmt.F_FlareId);
     this._flare_e       = bManager.GetShip(this._fmt.E_FlareId);
     this._searchlight_f = bManager.GetShip(this._fmt.F_SearchId);
     this._searchlight_e = bManager.GetShip(this._fmt.E_SearchId);
     this._ration        = ration;
 }
Ejemplo n.º 18
0
 private bool Init(ShipModel_BattleAll model)
 {
     this._clsShipModel = model;
     this._fVoiceLength = ShipUtils.GetVoiceLength(this._clsShipModel, 22);
     this._uiShipTexture.mainTexture = ShipUtils.LoadTexture(model, true);
     this._uiShipTexture.get_transform().set_localPosition(ShipUtils.GetShipOffsPos(this._clsShipModel, false, MstShipGraphColumn.CutInSp1));
     this._psStar.Stop();
     this._psSmoke.Stop();
     return(true);
 }
Ejemplo n.º 19
0
 private bool Init(ShipModel_BattleAll model)
 {
     _clsShipModel = model;
     _fVoiceLength = ShipUtils.GetVoiceLength(_clsShipModel, 22);
     _uiShipTexture.mainTexture             = ShipUtils.LoadTexture(model, isStart: true);
     _uiShipTexture.transform.localPosition = ShipUtils.GetShipOffsPos(_clsShipModel, isDamaged: false, MstShipGraphColumn.CutInSp1);
     _psStar.Stop();
     _psSmoke.Stop();
     return(true);
 }
Ejemplo n.º 20
0
        private bool InitBattleData(bool isNightCombat)
        {
            BattleManager battleManager = BattleCutManager.GetBattleManager();
            BattleData    battleData    = BattleCutManager.GetBattleData();
            FleetInfos    fleetInfos    = _listFleetInfos[0];
            FleetInfos    fleetInfos2   = _listFleetInfos[1];

            battleData.friendFleetHP.attackCnt = 4;
            battleData.enemyFleetHP.attackCnt  = 4;
            battleData.friendFleetHP.ClearOneAttackDamage();
            battleData.enemyFleetHP.ClearOneAttackDamage();
            _listFleetInfos.ForEach(delegate(FleetInfos x)
            {
                x.circleGauge.SetActive(isActive: true);
            });
            _listFleetInfos.ForEach(delegate(FleetInfos x)
            {
                x.shipHPBarAnchor.SetActive(isActive: true);
            });
            _listFleetInfos[0].shipHPBarAnchor.localPositionX(-346.5f);
            CalcSumHp();
            for (int i = 0; i < 6; i++)
            {
                ShipModel_BattleAll shipModel_BattleAll  = battleManager.Ships_f[i];
                ShipModel_BattleAll shipModel_BattleAll2 = battleManager.Ships_e[i];
                if (shipModel_BattleAll != null)
                {
                    fleetInfos.hpBars[i].SetHpBar(shipModel_BattleAll);
                    fleetInfos.hpBars[i].hpData.SetEndHP(shipModel_BattleAll.HpEnd);
                    for (int j = 0; j < fleetInfos.hpBars[i].hpData.oneAttackDamage.Length; j++)
                    {
                        battleData.friendFleetHP.oneAttackDamage[j] += fleetInfos.hpBars[i].hpData.oneAttackDamage[j];
                    }
                }
                else
                {
                    fleetInfos.hpBars[i].Hide();
                }
                if (shipModel_BattleAll2 != null)
                {
                    fleetInfos2.hpBars[i].SetHpBar(shipModel_BattleAll2);
                    fleetInfos2.hpBars[i].hpData.SetEndHP(shipModel_BattleAll2.HpEnd);
                    for (int k = 0; k < fleetInfos2.hpBars[i].hpData.oneAttackDamage.Length; k++)
                    {
                        battleData.enemyFleetHP.oneAttackDamage[k] += fleetInfos2.hpBars[i].hpData.oneAttackDamage[k];
                    }
                }
                else
                {
                    fleetInfos2.hpBars[i].Hide();
                }
            }
            return(true);
        }
Ejemplo n.º 21
0
 public virtual void SetShipData(ShipModel_BattleAll model)
 {
     _clsIShipModel = model;
     if (model != null)
     {
         _uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model);
         _uiShipTex.localSize   = ResourceManager.SHIP_TEXTURE_SIZE[1];
         _uiShipTex.shader      = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[1] : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[0]);
         UpdateDamage(model.DmgStateEnd, model.IsEscape());
         _uiShipTex.MakePixelPerfect();
     }
 }
Ejemplo n.º 22
0
 public void SetHpBar(ShipModel_BattleAll model)
 {
     this.SetHpBar(new HPData(model.MaxHp, model.HpPhaseStart), (!model.IsFriend()) ? -1 : model.ShipType);
     if (model.IsFriend())
     {
         this._uiEscapeIcon.SetActive(model.IsEscape());
     }
     if (this._uiRepairIcon != null)
     {
         this._uiRepairIcon.SetActive(false);
     }
 }
Ejemplo n.º 23
0
 private static int SPConvertShipBannerID(ShipModel_BattleAll model)
 {
     if (model.MstId == 610)
     {
         return(609);
     }
     if (model.MstId == 612)
     {
         return(611);
     }
     return(model.MstId);
 }
Ejemplo n.º 24
0
        private void DecideAdvancingWithDrawalBtn(UIHexButton btn)
        {
            ShipModel_BattleAll shipModel_BattleAll = BattleTaskManager.GetBattleManager().Ships_f[0];

            if (btn.index == 1 && !shipModel_BattleAll.HasRecoverYouin())
            {
                return;
            }
            if (btn.index == 2 && !shipModel_BattleAll.HasRecoverMegami())
            {
                return;
            }
            if (btn.index == 1 && this._btnIndex != btn.index)
            {
                this._btnIndex = btn.index;
                KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove);
                this.SetAdvancingWithdrawalBtnState(this._btnIndex);
                return;
            }
            if (btn.index == 2 && this._btnIndex != btn.index)
            {
                this._btnIndex = btn.index;
                KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove);
                this.SetAdvancingWithdrawalBtnState(this._btnIndex);
                return;
            }
            if (btn.index == 0 && this._btnIndex != btn.index)
            {
                this._btnIndex = btn.index;
                KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove);
                this.SetAdvancingWithdrawalBtnState(this._btnIndex);
                return;
            }
            if (this._isDecide)
            {
                return;
            }
            this._isDecide = true;
            KCV.Utils.SoundUtils.PlaySE(SEFIleInfos.SE_036);
            this._listHexBtns.ForEach(delegate(UIHexButton x)
            {
                x.isColliderEnabled = false;
            });
            this.SetAdvancingWithdrawalBtnState(btn.index);
            UIBattleNavigation battleNavigation = BattleTaskManager.GetPrefabFile().battleNavigation;

            battleNavigation.Hide(0.2f, null);
            if (this._delDecideAdvancingWithdrawalButton != null)
            {
                this._delDecideAdvancingWithdrawalButton(btn);
            }
        }
Ejemplo n.º 25
0
        public void SetFlagShipInfo(FleetType type, ShipModel_BattleAll flagShip)
        {
            bool flag = false;

            if (flagShip.DmgStateEnd == DamageState_Battle.Tyuuha || flagShip.DmgStateEnd == DamageState_Battle.Taiha || flagShip.DmgStateEnd == DamageState_Battle.Gekichin)
            {
                flag = true;
            }
            this._listFlagShipTex.get_Item(type).mainTexture = ShipUtils.LoadTexture(flagShip, flag);
            this._listFlagShipTex.get_Item(type).MakePixelPerfect();
            this._listFlagShipTex.get_Item(type).get_transform().set_localPosition(ShipUtils.GetShipOffsPos(flagShip, flag, MstShipGraphColumn.CutIn));
            this._dicIsCutIn.set_Item(type, true);
        }
Ejemplo n.º 26
0
 public void SetHpBarAfter(ShipModel_BattleAll model, BattleManager manager)
 {
     SetHpBar(new HPData(model.MaxHp, model.HpEnd), (!model.IsFriend()) ? (-1) : model.ShipType);
     if (model.IsFriend())
     {
         _uiEscapeIcon.SetActive(model.IsEscape());
     }
     if (manager.IsUseRecoverySlotitem(model.TmpId) != 0 && _uiRepairIcon != null)
     {
         _uiRepairIcon.spriteName = ((!_isBattleCut) ? "fuki2_set" : "fuki_set");
         _uiRepairIcon.SetActive(isActive: true);
     }
 }
Ejemplo n.º 27
0
        private void SetShipTexture(ShipModel_BattleAll model, bool isStart)
        {
            bool isDamaged         = (!isStart) ? model.DamagedFlgEnd : model.DamagedFlgStart;
            int  shipStandingTexID = ShipUtils.GetShipStandingTexID(model.IsFriend(), model.IsPractice(), isDamaged);

            if (!(_clsObject3D.mainTexture != null) || !(_clsObject3D.mainTexture.name == shipStandingTexID.ToString()))
            {
                _clsObject3D.mainTexture = ShipUtils.LoadTexture(model, isStart);
                _clsObject3D.MakePixelPerfect();
                _clsObject3D.transform.localScale    = _clsObject3D.transform.localScale * (float)model.Offsets.GetScaleMag_InBattle(model.DamagedFlgStart);
                _clsObject3D.transform.localPosition = ShipUtils.GetShipOffsPos(model, isDamaged, MstShipGraphColumn.Foot);
            }
        }
        public void SetFlagShipInfo(FleetType type, ShipModel_BattleAll flagShip)
        {
            bool flag = false;

            if (flagShip.DmgStateEnd == DamageState_Battle.Tyuuha || flagShip.DmgStateEnd == DamageState_Battle.Taiha || flagShip.DmgStateEnd == DamageState_Battle.Gekichin)
            {
                flag = true;
            }
            _listFlagShipTex[type].mainTexture = ShipUtils.LoadTexture(flagShip, flag);
            _listFlagShipTex[type].MakePixelPerfect();
            _listFlagShipTex[type].transform.localPosition = ShipUtils.GetShipOffsPos(flagShip, flag, MstShipGraphColumn.CutIn);
            _dicIsCutIn[type] = true;
        }
Ejemplo n.º 29
0
 public void SetHpBarAfter(ShipModel_BattleAll model, BattleManager manager)
 {
     this.SetHpBar(new HPData(model.MaxHp, model.HpEnd), (!model.IsFriend()) ? -1 : model.ShipType);
     if (model.IsFriend())
     {
         this._uiEscapeIcon.SetActive(model.IsEscape());
     }
     if (manager.IsUseRecoverySlotitem(model.TmpId) != ShipRecoveryType.None && this._uiRepairIcon != null)
     {
         this._uiRepairIcon.spriteName = ((!this._isBattleCut) ? "fuki2_set" : "fuki_set");
         this._uiRepairIcon.SetActive(true);
     }
 }
        public ShipModel_BattleAll GetShip(int index, bool is_friend)
        {
            List <ShipModel_BattleAll> list = (!is_friend) ? this._ships_e : this._ships_f;

            if (0 <= index && index < list.get_Count())
            {
                ShipModel_BattleAll shipModel_BattleAll = list.get_Item(index);
                if (shipModel_BattleAll != null)
                {
                    return(shipModel_BattleAll);
                }
            }
            return(null);
        }