Exemplo n.º 1
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);
     }
 }
Exemplo n.º 2
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);
     }
 }
Exemplo n.º 3
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);
     }
 }
Exemplo n.º 4
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);
            }
        }
Exemplo n.º 5
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 (this._clsObject3D.mainTexture != null && this._clsObject3D.mainTexture.get_name() == shipStandingTexID.ToString())
            {
                return;
            }
            this._clsObject3D.mainTexture = ShipUtils.LoadTexture(model, isStart);
            this._clsObject3D.MakePixelPerfect();
            this._clsObject3D.get_transform().set_localScale(this._clsObject3D.get_transform().get_localScale() * (float)model.Offsets.GetScaleMag_InBattle(model.DamagedFlgStart));
            this._clsObject3D.get_transform().set_localPosition(ShipUtils.GetShipOffsPos(model, isDamaged, MstShipGraphColumn.Foot));
        }
        public static Texture2D LoadBannerTextureInTacticalSituation(ShipModel_BattleAll model)
        {
            int texNum;

            if (model.IsFriend())
            {
                texNum = ((!model.DamagedFlgEnd) ? 1 : 2);
            }
            else
            {
                texNum = ((!model.IsPractice()) ? 1 : ((!model.DamagedFlgEnd) ? 1 : 2));
            }
            return(SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(ShipUtils.SPConvertShipBannerID(model), texNum));
        }
Exemplo n.º 7
0
 public void SetShipInfos(ShipModel_BattleAll model, bool isStart)
 {
     if (model == null)
     {
         _clsShip = model;
         this.SetActive(isActive: false);
         return;
     }
     _clsShip    = model;
     _iFleetType = ((!model.IsFriend()) ? FleetType.Enemy : FleetType.Friend);
     SetShipTexture(model, isStart);
     SetPointOfGaze(model, isStart);
     SetSPPointOfGaze(model, isStart);
     base.name = model.Name;
 }
        public RaigekiModel(Raigeki data, Dictionary <int, ShipModel_BattleAll> ships)
        {
            List <ShipModel_BattleAll> list = new List <ShipModel_BattleAll>();

            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            List <ShipModel_BattleAll> list2 = list;

            list = new List <ShipModel_BattleAll>();
            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            list.Add(null);
            List <ShipModel_BattleAll> list3 = list;

            using (Dictionary <int, ShipModel_BattleAll> .ValueCollection.Enumerator enumerator = ships.get_Values().GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ShipModel_BattleAll current = enumerator.get_Current();
                    if (current.IsFriend())
                    {
                        list2.set_Item(current.Index, current);
                    }
                    else
                    {
                        list3.set_Item(current.Index, current);
                    }
                }
            }
            this._Init(list2, list3, data);
        }