private void AdjustNecessities(double necessityEffect) { Necessities.AdjustSleep(necessityEffect); Necessities.AdjustHunger(necessityEffect); Necessities.AdjustThirst(necessityEffect); Necessities.AdjustHygiene(necessityEffect); Necessities.AdjustHealth(necessityEffect); }
public void Eat(int hungerEffectiveness) { Necessities.Rating previousHungerRating = Necessities.Hunger; Necessities.AdjustHunger(hungerEffectiveness); log.Debug(String.Format("Employee named {0} just ate to increase hunger need from {1} to {2}.", FullName, previousHungerRating, Necessities.Hunger)); // if, after eating, our hunger is above the threshold AND our previous hunger was below the threshold, our hunger has been satisfied, notify subscribers if (Necessities.Hunger >= Necessities.Rating.Neutral && previousHungerRating < Necessities.Rating.Neutral) { OnThoughtSatisfied(ThoughtType.Hungry); } }