Ejemplo n.º 1
0
 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();
             }
         }
     }
 }
Ejemplo n.º 2
0
    public void DeleteFacilityNamePlate(int userFacilityID)
    {
        ConstructionName facilityNamePlate = this.GetFacilityNamePlate(userFacilityID);

        if (null != facilityNamePlate)
        {
            facilityNamePlate.Close();
        }
    }
Ejemplo n.º 3
0
    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);
            }
        }
    }
Ejemplo n.º 4
0
    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;
            }
        }
    }
Ejemplo n.º 5
0
    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);
                }
            }
        }
    }
Ejemplo n.º 6
0
 public void SetNamePlate(ConstructionName parentNamePlate)
 {
     this.namePlate = parentNamePlate;
 }