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(); } }
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); } }
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 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); } }
private ShipModel_Eater _GetSharedShip(Dictionary <int, List <Mst_slotitem> > data, ShipModel_BattleAll candidate) { if (candidate == null) { return(null); } if (candidate.DmgStateEnd == DamageState_Battle.Gekichin) { return(null); } if (candidate.IsEscape()) { return(null); } if (data.ContainsKey(candidate.TmpId)) { return(null); } return(candidate.__CreateEater__()); }