예제 #1
0
    /// <summary>
    /// Removes the nutrient from stomach.
    /// </summary>
    /// <param name="nutrient">Nutrient.</param>
    void Egest()
    {
        if (state.inStomach.Count == 0)
        {
            return;
        }

        Nutrient nutrient = state.inStomach.Peek();

        state.inStomach.Dequeue();
        nutrient.transform.position = transform.position;
        nutrient.LoadParent();
        state.otherNutValue -= nutrient.Value;
        UpdateCurrentHP();
        nutrient.Type = config.egestType;
        nutrient.gameObject.SetActive(true);
    }