public static void PlantCreated() { if (instance._plantsNumber == 0 && instance.RabbitData.Count == 0) { OnFirstLivingBeingCreated?.Invoke(); } instance._plantsNumber++; }
public static void AnimalIsBorn(Animal animal) { if (instance.RabbitData.Count == 0 && instance._plantsNumber == 0) { OnFirstLivingBeingCreated?.Invoke(); } AnimalData aData = new AnimalData(animal.GetAdultMoveSpeed(), animal.GetSenseRadius()); instance.RabbitData.Add(aData); OnAnimalNumberIncreased?.Invoke(aData); if (!instance._firstAnimalIsBorn) { instance.StartCoroutine(instance.GatherData()); instance._firstAnimalIsBorn = true; } }