private void setShipTexture() { if (_ship != null) { GameObject gameObject = base.transform.FindChild("ShipObj").gameObject; ShipModel_BattleResult model = (ShipModel_BattleResult)_ship; float lovScaleMagnification = SortieBattleUtils.GetLovScaleMagnification(model); _uiShip.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(_ship.GetGraphicsMstId(), isDamaged: false); _uiShip.MakePixelPerfect(); _uiShip.transform.localPosition = Util.Poi2Vec(new ShipOffset(_ship.GetGraphicsMstId()).GetShipDisplayCenter(damaged: false)); _uiShip.transform.localScale = new Vector3(lovScaleMagnification, lovScaleMagnification, 1f); float num = (lovScaleMagnification - 1f) * 120f; gameObject.transform.localPosition = new Vector3(1f, 140f - num, 1f); } }
private void setShipTexture(int index, ShipModel_BattleAll ship, bool isShink) { this._uiShip[index].SetActive(true); this._uiShip[index].mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(ship.GetGraphicsMstId(), false); this._uiShip[index].MakePixelPerfect(); this._uiShip[index].color = ((!isShink) ? new Color(1f, 1f, 1f, 0f) : new Color(0.3f, 0.3f, 0.3f, 0f)); if (index == 0) { this._uiShip[0].get_transform().set_localPosition(Util.Poi2Vec(new ShipOffset(ship.GetGraphicsMstId()).GetShipDisplayCenter(false))); } else { this._uiShip[index].get_transform().set_localPosition(Util.Poi2Vec(new ShipOffset(ship.GetGraphicsMstId()).GetFace(false))); } }
public static Texture2D LoadTexture(ShipModel_BattleAll model, bool isStart) { return(LoadTexture(model.GetGraphicsMstId(), (!isStart) ? model.DamagedFlgEnd : model.DamagedFlgStart)); }
private void _setShipTexture() { _uiShip.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(_clsShipModel, isStart: false); _uiShip.MakePixelPerfect(); _uiShip.transform.localPosition = Util.Poi2Vec(new ShipOffset(_clsShipModel.GetGraphicsMstId()).GetShipDisplayCenter(damaged: true)); }