public void SaveResponseToFacilityBuild(int userFacilityID) { FarmRoot instance = FarmRoot.Instance; FarmObjectSetting component = base.GetComponent <FarmObjectSetting>(); instance.ResetSettingMark(); component.farmObject.DisplayFloorObject(); instance.SetActiveNotTouchObject(true); FarmObject farmObject = component.farmObject; FarmGrid.GridPosition gridPosition = component.ComplatedSetting(); farmObject.userFacilityID = userFacilityID; UserFacility facility = this.StartBuild(farmObject, gridPosition); Singleton <UserDataMng> .Instance.AddUserFacility(facility); this.farmObjects.Add(farmObject); FacilityM facilityMaster = FarmDataManager.GetFacilityMaster(farmObject.facilityID); FarmUtility.PayCost(facilityMaster.buildingAssetCategoryId1, facilityMaster.buildingAssetNum1); if (0 < int.Parse(facilityMaster.buildingTime) || int.Parse(facilityMaster.autoBuildingFlg) == 0) { this.StartConstruction(userFacilityID); } else { farmObject.BuildComplete(); } }
public void SaveResponseToStockToFarmFacility(int userFacilityID) { FarmRoot instance = FarmRoot.Instance; FarmObjectSetting component = base.GetComponent <FarmObjectSetting>(); instance.ResetSettingMark(); component.farmObject.DisplayFloorObject(); instance.SetActiveNotTouchObject(true); FarmObject farmObject = component.farmObject; component.ComplatedSetting(); farmObject.userFacilityID = userFacilityID; this.farmObjects.Add(farmObject); farmObject.BuildComplete(); }