public void UpdateShip([Optional, DefaultParameterValue(null)] UserShip ship)
 {
     if (ship != null)
     {
         this.userShip = ship;
     }
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.userShip);
     }
     if (this.userShip != null)
     {
         this.oilNeedTM.text = this.userShip.RepairOilNeeds + string.Empty;
         this.oilNeedTM.Commit();
         this.steelNeedTM.text = this.userShip.RepairSteelNeeds + string.Empty;
         this.steelNeedTM.Commit();
         this.timeNeedTM.text = TimeFormatter.Get6DFormat(this.userShip.RepairTimeSecondsNeeds);
         this.timeNeedTM.Commit();
     }
     if (this.inExploreObj != null)
     {
         this.inExploreObj.SetActive(this.userShip.IsInExplore);
     }
 }
 protected override void InitContents()
 {
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.shipConfig);
         this.showShipInfo.CheckInit();
     }
     else if (!AllShipConfigs.instance.IsCardReleased(this.index))
     {
         if (this.bgSprite != null)
         {
             this.bgSprite.SetSprite("cardItemEmptyBgLock");
         }
         if (this.indexTextMesh != null)
         {
             this.indexTextMesh.gameObject.SetActive(false);
         }
     }
     if (this.indexTextMesh != null)
     {
         this.indexTextMesh.text = "No." + this.index;
         this.indexTextMesh.Commit();
     }
 }
 public void UpdateShip([Optional, DefaultParameterValue(null)] UserShip ship)
 {
     if (ship != null)
     {
         this.userShip = ship;
     }
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.userShip);
     }
     ShipConfig config = this.userShip.ship;
     if (this.atkLevelText != null)
     {
         this.SetLevel2(this.atkLevelText, config.atk, this.userShip.strengthenAttribute.atk / config.strengthenLevelUpExp, config.strengthenTop.atk / config.strengthenLevelUpExp, this.atkLevelMaxObj);
         this.SetLevel2(this.torpedoLevelText, config.torpedo, this.userShip.strengthenAttribute.torpedo / config.strengthenLevelUpExp, config.strengthenTop.torpedo / config.strengthenLevelUpExp, this.torpedoLevelMaxObj);
         this.SetLevel2(this.airDefLevelText, config.airDef, this.userShip.strengthenAttribute.air_def / config.strengthenLevelUpExp, config.strengthenTop.air_def / config.strengthenLevelUpExp, this.airDefLevelMaxObj);
         this.SetLevel2(this.defLevelText, config.def, this.userShip.strengthenAttribute.def / config.strengthenLevelUpExp, config.strengthenTop.def / config.strengthenLevelUpExp, this.defLevelMaxObj);
     }
     if (this.inExploreObj != null)
     {
         this.inExploreObj.SetActive(this.userShip.IsInExplore);
     }
     if (this.inRepairObj != null)
     {
         this.inRepairObj.SetActive(this.userShip.IsInRepair);
     }
 }
 public void UpdateShip([Optional, DefaultParameterValue(null)] UserShip ship, [Optional, DefaultParameterValue(false)] bool isInExplore)
 {
     if (ship != null)
     {
         this.userShip = ship;
     }
     this.isInExplore = isInExplore;
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.userShip);
     }
     if (isInExplore)
     {
         this.inExploreMark.SetActive(true);
         this.blackMark.SetActive(true);
     }
     if (GameData.instance.IsShipInReapir(this.userShip.id))
     {
         this.inRepairMark.SetActive(true);
         this.blackMark.SetActive(true);
     }
     this.oilWarningObj.SetActive((this.userShip.maxProps.oil - this.userShip.props.oil) > 0);
     this.ammoWarningObj.SetActive((this.userShip.maxProps.ammo - this.userShip.props.ammo) > 0);
 }
 public void SetUserShip(UserShip us, bool isFlag)
 {
     this.commonShipInfo = base.GetComponent<ShowCommonShipInfo>();
     this.commonShipInfo.UpdateShip(us);
     CheckShipLoveUpdate component = base.GetComponent<CheckShipLoveUpdate>();
     if (component != null)
     {
         component.SetUserShip(us);
     }
 }
 private void UpdateShipInfo()
 {
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     UserShip shipById = GameData.instance.GetShipById(this.dockInfo.shipId);
     if ((this.showShipInfo != null) && (shipById != null))
     {
         this.showShipInfo.userShip = shipById;
         this.showShipInfo.UpdateShip((UserShip) null);
         if (this.isFinished)
         {
             this.showShipInfo.SetHpIsFull();
         }
     }
     this.shipResultInfo = base.GetComponent<ShipResultInfo>();
     if (this.shipResultInfo != null)
     {
         this.shipResultInfo.UserShip = shipById;
     }
 }
 public void UpdateShip([Optional, DefaultParameterValue(null)] UserShip ship)
 {
     if (ship != null)
     {
         this.userShip = ship;
     }
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.userShip);
     }
     if (this.inExploreObj != null)
     {
         this.inExploreObj.SetActive(this.userShip.IsInExplore);
     }
     if (this.inRepairObj != null)
     {
         this.inRepairObj.SetActive(this.userShip.IsInRepair);
     }
 }
 public void UpdateShip(UserShip us)
 {
     this.us = us;
     this.sc = base.GetComponent<ShowCommonShipInfo>();
     this.sc.UpdateShip(us);
     if (this.sTM != null)
     {
         this.sTM.Text = us.ship.getDialogue;
     }
     else
     {
         this.getDialog.text = us.ship.getDialogue;
         this.getDialog.Commit();
     }
     this.typeTM.text = Localization.Localize("ShipTypeDetail" + ((int) us.ship.type));
     this.typeTM.Commit();
     this.fullColor.ShowColorOf(us.ship.star);
     if (GameData.instance.IsShipNewUnlocked(us.ship.cid))
     {
         this.newSign.SetActive(true);
         GameData.instance.SetShipHasUnlocked(us.ship.cid);
     }
 }
 public void UpdateShip([Optional, DefaultParameterValue(null)] UserShip ship)
 {
     if (ship != null)
     {
         this.userShip = ship;
     }
     this.showShipInfo = base.GetComponent<ShowCommonShipInfo>();
     if (this.showShipInfo != null)
     {
         this.showShipInfo.UpdateShip(this.userShip);
     }
     if (this.userShip.fleetId > 0)
     {
         this.inFleetMark.SetActive(true);
         this.canNotSelectBlackMark.SetActive(true);
         this.DisableClick();
     }
     if (GameData.instance.IsShipInReapir(this.userShip.id))
     {
         this.inRepairMark.SetActive(true);
         this.canNotSelectBlackMark.SetActive(true);
         this.DisableClick();
     }
     this.UpdateStrengthenAmount();
     this.UpdateLockStatus();
 }