Ejemplo n.º 1
0
    public void PerformTask(Farmer owner)
    {
        if (task == "Home")
        {
            Debug.Log("FoodStockpiled: " + owner.GetFoodCarryingNum());
            gameController.AddFood(owner.GetFoodCarryingNum());
            owner.AddFoodCarryingNum(-owner.GetFoodCarryingNum());
        }

        if (task == "PlantBed")
        {
            owner.AddFoodCarryingNum(Mathf.RoundToInt(gameController.PlantBed_FoodYield * owner.GetNPCLevel() / 2f));
            //Debug.Log("Food to be added:" + Mathf.RoundToInt(gameController.PlantBed_FoodYield * owner.GetNPCLevel() / 2f));
            //Debug.Log("Food Carried:" + owner.GetFoodCarryingNum());
        }
        TaskCooldown = taskCooldownMax;
    }