public void StopReproductiveUrge() { if (_reproductiveUrge.Value) { _reproductiveUrge = false; OnAnimalWithReproductiveUrge?.Invoke(); StartReproductiveUrge(); } }
private IEnumerator ReproductiveUrgeRoutine() { float timeVariation = UnityEngine.Random.Range(-_repUrgeTimeVar, _repUrgeTimeVar); yield return(new WaitForSeconds(_repUrgeTime + timeVariation)); _reproductiveUrge = true; OnAnimalWithReproductiveUrge?.Invoke(); }