Esempio n. 1
0
 /// <summary>
 /// Updates the refugee food stat.
 /// </summary>
 private void UpdateFood()
 {
     if (house == null)
     {
         food.SubtractCurrStat(foodDecrease);
     }
     else if (!(house.GetType() == typeof(HomelessHouse)))
     {
         food.SetMaxStat(house.GetFoodHealth());
         if (food.GetMaxStatVal() < food.GetCurrStatVal())
         {
             food.SubtractCurrStat(foodDecrease);
         }
         else
         {
             food.AddCurrStat(foodIncrease);
         }
     }
 }