Beispiel #1
0
    public void eat(GameObject obj, FoodObject food)
    {
        food.onEat();
        hunger -= food.HUNGER_VALUE;
        thirst -= food.THIRST_VALUE;

        checkValueLimits();

        StartCoroutine(DestroyObjectAfterTime(1, obj));

        Debug.Log("Eat");
        Debug.Log(hunger);
        Debug.Log(thirst);
    }