private void SetupBuilding(MonoIslandBuilding building) { CabinDataItemBase base2 = this.buildingDataDict[building]; int extendGrade = (base2.status != CabinStatus.UnLocked) ? 1 : base2.extendGrade; CabinExtendGradeMetaData cabinExtendGradeMetaDataByKey = CabinExtendGradeMetaDataReader.GetCabinExtendGradeMetaDataByKey(base2.cabinType, extendGrade); building.UpdateBuildingWhenExtend(cabinExtendGradeMetaDataByKey.buildingPath); }
public ResetTechTreeDialogContext(CabinDataItemBase data) { ContextPattern pattern = new ContextPattern { contextName = "ResetTechTreeDialogContext", viewPrefabPath = "UI/Menus/Dialog/ResetTechTreeDialog" }; base.config = pattern; this._cabinData = data; }
public CabinOverviewPageContext(CabinDataItemBase cabinData, Dictionary <MonoIslandBuilding, CabinDataItemBase> buildingDataDict) { ContextPattern pattern = new ContextPattern { contextName = "CabinOverviewPageContext", viewPrefabPath = "UI/Menus/Page/Island/IslandCabinOverviewPage", cacheType = ViewCacheType.AlwaysCached }; base.config = pattern; this._cabinData = cabinData; this._buildingDataDict = buildingDataDict; }
public CabinEnhanceDialogContext(CabinDataItemBase cabinData, CainEnhanceType enhanceType) { ContextPattern pattern = new ContextPattern { contextName = "CabinEnhanceDialogContext", viewPrefabPath = "UI/Menus/Dialog/CabinEnhanceDialog" }; base.config = pattern; this._cabinData = cabinData; this._extendGradBefore = this._cabinData.extendGrade; this._enhanceType = enhanceType; }
private bool OnIslandCameraLanded(MonoIslandBuilding buidling) { CabinDataItemBase base2 = this._buildingDataDict[buidling]; if (base2.status == CabinStatus.UnLocked) { this._cabinData = base2; this.SetupView(); } else { this.BackPage(); } return(false); }
public void BindingTargetBuilding(MonoIslandBuilding target, CabinDataItemBase cabinData) { this._cabinData = cabinData; this._target = target; this._isUpdating = true; Dictionary <CabinType, bool> cabinNeedToShowNewUnlockDict = Singleton <MiHoYoGameData> .Instance.LocalData.CabinNeedToShowNewUnlockDict; bool flag = !cabinNeedToShowNewUnlockDict.ContainsKey(this._cabinData.cabinType) ? false : cabinNeedToShowNewUnlockDict[this._cabinData.cabinType]; this._LvInfo_Lv_PopUp_New.gameObject.SetActive(flag); this._LvInfo_Lv_PopUp_PopUp.gameObject.SetActive(false); if (!flag) { this.RefreshPopUp(); } this._target.GetModel().RefreshLockStyle(this._cabinData.status); bool flag2 = (this._cabinData is CabinCollectDataItem) && (this._cabinData as CabinCollectDataItem).CanFetchScoin(); this._Output.gameObject.SetActive(flag2); this._lastFrame_output_active = flag2; this._Locked.gameObject.SetActive(this._cabinData.status == CabinStatus.Locked); this._LvInfo.gameObject.SetActive(this._cabinData.status == CabinStatus.UnLocked); this._lastFrame_cabinStatus = this._cabinData.status; if (this._cabinData.status == CabinStatus.UnLocked) { this._LvInfo_Lv_Name_TextComp.text = this._cabinData.GetCabinName(); } bool flag3 = this._cabinData.levelUpEndTime > TimeUtil.Now; this._LvInfo_LvUpProgress.gameObject.SetActive(flag3); if (flag3) { E_TimeFormat timeFormat = this.GetTimeFormat((TimeSpan)(this._cabinData.levelUpEndTime - TimeUtil.Now)); this.SetUITimeFormat(timeFormat); this._lastFrame_timeFormat = timeFormat; } }