Ejemplo n.º 1
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.º 2
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);
                }
            }
        }
    }