示例#1
0
 private void AdjustNecessities(double necessityEffect)
 {
     Necessities.AdjustSleep(necessityEffect);
     Necessities.AdjustHunger(necessityEffect);
     Necessities.AdjustThirst(necessityEffect);
     Necessities.AdjustHygiene(necessityEffect);
     Necessities.AdjustHealth(necessityEffect);
 }
示例#2
0
        public void Drink(int thirstEffectiveness)
        {
            Necessities.Rating previousThirstRating = Necessities.Thirst;
            Necessities.AdjustThirst(thirstEffectiveness);

            log.Debug(String.Format("Employee named {0} just drank to increase thirst need from {1} to {2}.", FullName, previousThirstRating, Necessities.Thirst));

            // if, after drinking, our thirst is above the threshold AND our previous thirst was below the threshold, our thirst has been satisfied, notify subscribers
            if (Necessities.Thirst >= Necessities.Rating.Neutral && previousThirstRating < Necessities.Rating.Neutral)
            {
                OnThoughtSatisfied(ThoughtType.Thirsty);
            }
        }