public void LoadInfo(CropSaveData info) { quality = info.quality; int tick = info.currentTickToHarvest; ForceGrow(tick, info.unhealthy); }
public void LoadInfo(PlotSaveData info) { Occupied = info.Occupied; QuantNutrients = info.QuantNutrients; WaterContent = info.WaterContent; UpdateSliders(); if (Occupied == true) { crop.Kill(); } if (info.Occupied == true) { CropSaveData temp = JsonUtility.FromJson <CropSaveData>(info.crop); string cropMother = temp.plantType; //Find Crop Mother CropMother cropToPlant = motherManager.FindMotherOnName(cropMother); //Plant Crop cropToPlant.NewPlant(this); //Edit Crop info crop.LoadInfo(temp); } }
public string SaveInfo() { CropSaveData saveData = new CropSaveData(); saveData.quality = quality; saveData.currentTickToHarvest = p_currentTickToHarvest; saveData.plantType = mother.name;//to id plant it is saveData.unhealthy = dyingPhase.activeSelf; string temp = JsonUtility.ToJson(saveData); return(temp); }