public void Feed(Animal.TypeOfFood food) { if (this.Type == food) { Console.WriteLine("Вы покормили животноеs"); } else { Console.WriteLine("Не тот тип еды"); } }
public void FindTarget(Animal.TypeOfFood typeOfFood) { stopCour = false; pathFound = false; TargetFinderObject.GetComponent <SphereCollider>().enabled = true; agent.ResetPath(); if (targets.Count <= 0) { StartCoroutine(Timer()); } switch (typeOfFood) { case Animal.TypeOfFood.Grass: foodTag = "EdibleFlora"; break; case Animal.TypeOfFood.Meet: foodTag = "EdibleFouna"; break; } }