예제 #1
0
 /// <summary>
 /// Helper method to add the given nutrient to stomach.
 /// </summary>
 /// <param name="nutrient">A wild Nutrient.</param>
 public void Ingest(Nutrient nutrient)
 {
     if (nutrient == null)
     {
         return;
     }
     state.inStomach.Enqueue(nutrient);
     nutrient.SaveParent();
     state.otherNutValue += nutrient.Value;
     UpdateCurrentHP();
     nutrient.transform.parent = transform;
     nutrient.gameObject.SetActive(false);
 }