private IEnumerator Eat(IConsumable consumable) { if (_arrival.FinishZone.Taken) { SetDestination(DefineGoal()); _eat = null; yield break; } _consumable = consumable; _arrival.FinishZone.Taken = true; consumable.Reserve(); while (consumable.Consuming(_hunger)) { _hunger = UpdateValue(_hunger, -20); _rigidBody.velocity = Vector3.zero; _rigidBody.angularVelocity = Vector3.zero; yield return(null); } _consumable = null; consumable.Consume(); SetDestination(DefineGoal()); _eat = null; }