public void RefreshLockStyle(CabinStatus _targetStatus) { if ((this._status == CabinStatus.UnLocked) && (_targetStatus == CabinStatus.Locked)) { this.ToLockGraphic(); this._status = CabinStatus.Locked; } else if ((this._status == CabinStatus.Locked) && (_targetStatus == CabinStatus.UnLocked)) { this.ToUnLockGraphic(); this._status = CabinStatus.UnLocked; } }
private void Update() { if (this._isUpdating) { this.UpdateUIPosition(); this.UpdateStatus(); if (this._cabinData.status == CabinStatus.UnLocked) { this.UpdateOutput(); this.UpdateBackgroundVenture(); this.UpdateLevelUp(); this.UpdateCabinLevel(); } this._lastFrame_cabinStatus = this._cabinData.status; } }
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; } }