protected override void SetLovOffset(ShipModel_BattleResult model) { LovLevel lovLevel = SortieBattleUtils.GetLovLevel(model); Vector3 localScale = Vector3.one * SortieBattleUtils.GetLovScaleMagnification(lovLevel); float t = Mathe.Rate(0f, 1f, 1f / (float)(Enum.GetValues(typeof(LovLevel)).Length - 1) * (float)(lovLevel - 1)); _vTweenTargetPos = Vector3.Lerp(originPos, lovMaxPos, t); base.transform.localScale = localScale; base.transform.localPositionY(_vTweenTargetPos.y); }
protected override void SetLovOffset(ShipModel_BattleResult model) { LovLevel lovLevel = SortieBattleUtils.GetLovLevel(model); Vector3 localScale = Vector3.get_one() * SortieBattleUtils.GetLovScaleMagnification(lovLevel); float num = Mathe.Rate(0f, 1f, 1f / (float)(Enum.GetValues(typeof(LovLevel)).get_Length() - 1) * (float)(lovLevel - LovLevel.Normal)); this._vTweenTargetPos = Vector3.Lerp(this.originPos, this.lovMaxPos, num); base.get_transform().set_localScale(localScale); base.get_transform().localPositionY(this._vTweenTargetPos.y); }
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() { if (this._ship == null) { return; } GameObject gameObject = base.get_transform().FindChild("ShipObj").get_gameObject(); ShipModel_BattleResult model = (ShipModel_BattleResult)this._ship; float lovScaleMagnification = SortieBattleUtils.GetLovScaleMagnification(model); this._uiShip.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(this._ship.GetGraphicsMstId(), false); this._uiShip.MakePixelPerfect(); this._uiShip.get_transform().set_localPosition(Util.Poi2Vec(new ShipOffset(this._ship.GetGraphicsMstId()).GetShipDisplayCenter(false))); this._uiShip.get_transform().set_localScale(new Vector3(lovScaleMagnification, lovScaleMagnification, 1f)); float num = (lovScaleMagnification - 1f) * 120f; gameObject.get_transform().set_localPosition(new Vector3(1f, 140f - num, 1f)); }