public SeedGerminationRequirement(PlantSpeciesSeeds speciesSeeds) { humidityRequirement = speciesSeeds.humidityRequirement; tempetureRequirement = speciesSeeds.tempetureRequirement; timeRequirement = speciesSeeds.timeRequirement; timeMaximum = speciesSeeds.timeMaximum; }
internal override void SetupSpecificSimulation() { plantJobController = gameObject.AddComponent <PlantJobController>(); plantJobController.SetUpJobController(this, earth); plantSpeciesSeeds = GetComponent <PlantSpeciesSeeds>(); plantSpeciesSeeds.SetupPlantSpeciesSeeds(); growthStages = new NativeArray <GrowthStageData>(growthStagesInput.Count, Allocator.Persistent); for (int i = 0; i < growthStagesInput.Count; i++) { growthStages[i] = new GrowthStageData((PlantScript.GrowthStage)i, growthStagesInput[i].x, growthStagesInput[i].y, growthStagesInput[i].z); } }
public int GetAllStartingPlantsAndSeeds() { int count = 0; for (int i = 0; i < transform.childCount; i++) { PlantSpecies plantSpecies = transform.GetChild(i).GetComponent <PlantSpecies>(); if (plantSpecies != null) { count += plantSpecies.startingPopulation; PlantSpeciesSeeds speciesSeeds = plantSpecies.GetComponent <PlantSpeciesSeeds>(); if (speciesSeeds != null) { count += speciesSeeds.startingSeedCount; } } } return(count); }