public virtual void SetShipData(ShipModel_BattleResult model) { _clsIShipModel = model; if (model != null) { _uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model); _uiShipTex.localSize = ResourceManager.SHIP_TEXTURE_SIZE[(!model.IsDamaged()) ? 1 : 2]; _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()); } }
public bool Init(ShipModel_BattleResult model) { _clsShipModel = model; panel.alpha = 0f; if (model == null) { return(false); } index = model.Index; Texture2D texture2D = ShipUtils.LoadTexture(model); UITexture uiShipTexture = _uiShipTexture; Texture mainTexture = texture2D; _uiShipShadow.mainTexture = mainTexture; uiShipTexture.mainTexture = mainTexture; _uiShipTexture.MakePixelPerfect(); _uiShipShadow.MakePixelPerfect(); Vector3 vpos = Util.Poi2Vec(model.Offsets.GetShipDisplayCenter(model.IsDamaged())) + Vector3.down * 10f; _uiShipTexture.transform.localScale = Vector3.one * 1.1f; _uiShipTexture.transform.AddLocalPosition(vpos); _uiShipShadow.transform.AddLocalPosition(vpos); return(true); }
public bool Init(ShipModel_BattleResult model) { this._clsShipModel = model; this.panel.alpha = 0f; if (model == null) { return(false); } this.index = model.Index; Texture2D texture2D = ShipUtils.LoadTexture(model); UITexture arg_47_0 = this._uiShipTexture; Texture mainTexture = texture2D; this._uiShipShadow.mainTexture = mainTexture; arg_47_0.mainTexture = mainTexture; this._uiShipTexture.MakePixelPerfect(); this._uiShipShadow.MakePixelPerfect(); Vector3 vpos = Util.Poi2Vec(model.Offsets.GetShipDisplayCenter(model.IsDamaged())) + Vector3.get_down() * 10f; this._uiShipTexture.get_transform().set_localScale(Vector3.get_one() * 1.1f); this._uiShipTexture.get_transform().AddLocalPosition(vpos); this._uiShipShadow.get_transform().AddLocalPosition(vpos); return(true); }
public static Texture2D LoadBannerTexture(ShipModel_BattleResult model) { bool isDamaged = model.IsFriend() && model.IsDamaged(); return(LoadBannerTexture(model, isDamaged)); }
public static Texture2D LoadTexture(ShipModel_BattleResult model) { return(LoadTexture(model.GetGraphicsMstId(), model.IsDamaged())); }
public virtual void SetShipData(ShipModel_BattleResult model) { this._clsIShipModel = model; if (model == null) { return; } this._uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model); this._uiShipTex.localSize = ResourceManager.SHIP_TEXTURE_SIZE.get_Item((!model.IsDamaged()) ? 1 : 2); this._uiShipTex.shader = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(1) : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(0)); this.UpdateDamage(model.DmgStateEnd, model.IsEscape()); }