cpf 3 years ago
parent
commit
185fa4260a
  1. 32
      src/app/babylon/view/building-window/building-window.ts

32
src/app/babylon/view/building-window/building-window.ts

@ -904,6 +904,16 @@ export class BuildingWindow extends UIBase {
} }
//SceneManager.Instance.openInnerGlow(!isShowNameUI_JYJ_YG); //输油管和油气回收管太细,关闭内发光 //SceneManager.Instance.openInnerGlow(!isShowNameUI_JYJ_YG); //输油管和油气回收管太细,关闭内发光
switch (type) {
case JYZInfoMoudleType.SYG:
this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.YQHSGX, false);
this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.SYG, true);
break;
case JYZInfoMoudleType.YQHSGX:
this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.SYG, false);
this.showFacilityByType(this.facilitysByMoudle, JYZInfoMoudleType.YQHSGX, true);
break;
}
if (show) { if (show) {
@ -1144,6 +1154,28 @@ export class BuildingWindow extends UIBase {
} }
/**
*
* @param facilitysByMoudle
* @param type
* @param show
*/
showFacilityByType(facilitysByMoudle: Map<JYZInfoMoudleType, FacilityInfoByType[]>, type: JYZInfoMoudleType, show: boolean) {
let facilityByType = this.facilitysByMoudle.get(type);
if (facilityByType != null) {
facilityByType.forEach(element => {
let facilitys = element.facilityInfo;
if (facilitys != null) {
facilitys.forEach(facility => {
facility.setEnable(show);
})
}
});
}
}
//#endregion //#endregion

Loading…
Cancel
Save