private void Update() { this.timer -= Time.deltaTime; if (this.timer < 0f) { this.timer = 1f; bool flag = this.colosseumUtil.isOpen && DataMng.Instance().IsReleaseColosseum; if (this.colosseums[0].activeSelf != flag) { this.colosseums[0].SetActive(flag); } if (this.colosseums[1].activeSelf != !flag) { this.colosseums[1].SetActive(!flag); } if (this.constructionName == null && FarmRoot.Instance.farmUI != null) { GameObject gameObject = GUIManager.LoadCommonGUI("Farm/ConstructionName", FarmRoot.Instance.farmUI.gameObject); gameObject.name = "FacilityNamePlate_Colosseum"; this.constructionName = gameObject.GetComponent <ConstructionName>(); this.constructionName.farmObject = base.gameObject; if (this.colosseumUtil.isOpenAllDay) { this.CreateSignalColosseumEvent(); } } } }
public void DeleteFacilityNamePlate(int userFacilityID) { ConstructionName facilityNamePlate = this.GetFacilityNamePlate(userFacilityID); if (null != facilityNamePlate) { facilityNamePlate.Close(); } }
public void DeleteSignalMeatHarvest(int userFacilityId) { ConstructionName facilityNamePlate = this.GetFacilityNamePlate(userFacilityId); if (null != facilityNamePlate) { SignalMeatHarvest[] componentsInChildren = facilityNamePlate.GetComponentsInChildren <SignalMeatHarvest>(true); if (componentsInChildren != null && 0 < componentsInChildren.Length) { componentsInChildren[0].SetDisplay(false); } } }
public void CreateFacilityNamePlate(FarmObject farmObject) { ConstructionName constructionName = this.GetFacilityNamePlate(farmObject.userFacilityID); if (null == constructionName) { GameObject gameObject = this.CreateFarmObjectUI("Farm/ConstructionName", "FacilityNamePlate", farmObject.userFacilityID); if (null != gameObject) { constructionName = gameObject.GetComponent <ConstructionName>(); constructionName.farmObject = farmObject.gameObject; } } }
public void CreateSignalMeatHarvest(FarmObject farmObject) { ConstructionName facilityNamePlate = this.GetFacilityNamePlate(farmObject.userFacilityID); if (null != facilityNamePlate) { SignalMeatHarvest[] componentsInChildren = facilityNamePlate.GetComponentsInChildren <SignalMeatHarvest>(true); if (componentsInChildren != null && 0 < componentsInChildren.Length) { componentsInChildren[0].SetDisplay(true); } else { GameObject gameObject = GUIManager.LoadCommonGUI("Farm/SignalMeatHarvest", facilityNamePlate.gameObject); if (gameObject != null) { gameObject.name = "SignalMeatHarvest"; SignalMeatHarvest component = gameObject.GetComponent <SignalMeatHarvest>(); component.SetNamePlate(facilityNamePlate); component.SetDisplay(true); } } } }
public void SetNamePlate(ConstructionName parentNamePlate) { this.namePlate = parentNamePlate; }