//Subtracts food's size and increases the dragon's food consumed void Eat(Food food) { PlayerManager.instance.growth.foodConsumed += Mathf.Min(food.foodValue, biteSize); if (food.transform.localScale.x > 0.4) { food.Bite(biteSize); } //If the food is very small, finish it off //(Without this check, the food can become too small to see) else { food.Bite(Mathf.Infinity); } }