public void Eat(ObjectEat.EFood food) { this._caterpillarAnimator.SetTrigger("eat"); AudioSource.PlayClipAtPoint(this.eatSound, transform.position, 1.0f); this.eating = true; if (food == ObjectEat.EFood.MUSHROOM) { this._mushroomConsomed++; } this.canWalk = false; }
public void Eat(ObjectEat.EFood food) { this._caterpillar.Eat(food); }