/// <summary> /// Creates a population if needed, then adds a new animal to the population /// </summary> /// <param name="species">The species of the animals to be added</param> /// <param name="count">The number of animals to add</param> /// <param name="position">The position to add them</param> public Population UpdatePopulation(AnimalSpecies species, Vector3 position) { Population population = DoesPopulationExist(species, position); if (population == null) { population = CreatePopulation(species, position); } population.AddAnimal(position); return(population); }