Exemple #1
0
    private void OnConsume()
    {
        if (targetFood.Spawner != null)
        {
            // add affection to spawner §
        }

        objRegistry.RemoveFood(targetFood);

        // remove from hunger
        Creature.Hunger = Mathf.Max(0f, Creature.Hunger - 0.15f);

        if (!Creature.IsHungry)
        {
            Creature.Game.Announce("Baby Yoda is no longer hungry.");
            if (collectBehaviour.ItemInHand != null)
            {
                collectBehaviour.DropItem();
            }
        }

        targetFood     = null;
        collectingFood = false;

        collectBehaviour.Reset();
        SelectNextBehaviour();
    }