|
|
|
@ -62,8 +62,8 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
let uiItem = this.addBuildingItem(buildingInfo); |
|
|
|
|
|
|
|
|
|
if (buildingData.outdoorData != null && buildingData.outdoorData.modelData != null && buildingData.outdoorData.modelData.resName != null) { |
|
|
|
|
this.updateBuildingModel(buildingInfo, false, () => { |
|
|
|
|
buildingInfo.initFacility(); |
|
|
|
|
this.updateBuildingModel(buildingInfo, true, () => { |
|
|
|
|
// buildingInfo.initFacility();
|
|
|
|
|
BuildingStatus.enterSuccessObservable.notifyObservers(uiItem); |
|
|
|
|
if (onSuccess) { |
|
|
|
|
onSuccess(uiItem, index); |
|
|
|
@ -208,6 +208,7 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
* @param show true表示显示 |
|
|
|
|
*/ |
|
|
|
|
showJYZInfoModel(type: JYZInfoMoudleType, show: boolean) { |
|
|
|
|
console.log("showJYZInfoModel", type, show); |
|
|
|
|
if (this.currentJYZInfoMoudleType == type) { |
|
|
|
|
if (show) { |
|
|
|
|
return; //与上次显示的模块相同
|
|
|
|
@ -217,7 +218,9 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
this.showJYZModules(this.currentJYZInfoMoudleType, false); //先恢复之前隐藏的内容
|
|
|
|
|
if (this.currentJYZInfoMoudleType != null) { |
|
|
|
|
this.showJYZModules(this.currentJYZInfoMoudleType, false); //先恢复之前隐藏的内容
|
|
|
|
|
} |
|
|
|
|
this.showJYZModules(type, show);//展示本次要展示的内容
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -365,6 +368,7 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
buildingInfo.ModelInfo = modelInfo as ModelInfo_building; |
|
|
|
|
buildingInfo.ModelInfo.updateName(buildingInfo.buildingData.normalData.name); |
|
|
|
|
if (updateFacility) { |
|
|
|
|
|
|
|
|
|
InfoManager.createFacilityInfos(buildingInfo.buildingData.outdoorData, buildingInfo); |
|
|
|
|
} |
|
|
|
|
if (buildingInfo instanceof BuildingInfo_Environment) { |
|
|
|
@ -656,8 +660,14 @@ export class BuildingWindow extends UIBase {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!show) { |
|
|
|
|
if (show) { |
|
|
|
|
this.currentJYZInfoMoudleType = type; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
console.log("隐藏", this.currentJYZInfoMoudleType); |
|
|
|
|
this.currentJYZInfoMoudleType = null; |
|
|
|
|
// SceneManager.Instance.highLightLayer.removeAllMeshes();
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|