private void IncreaseMoodLevel(MoodLevel moodLevel, double amount) { if (moodLevel.Value < 1) { // If we're at rock bottom, start scheduling mood changes again. if (IsCompletelyUnsatisfied()) { ScheduleNextMoodChange(30); } moodLevel.Increase(amount); UpdateAnimalMoodGameState(); // If the animal is now completely satisfied, delay the next mood // change by 15 game minutes to give the player some rest. if (IsCompletelySatisfied()) { this.DelayMoodChangeByGameMinutes = 60; } else { this.DelayMoodChangeByGameMinutes = 15; } if (//++this.CreditPoints >= PointsNeededForExtraCredits /*&&*/ IsSatisfied()) { DepositCreditsToGameState(ExtraCredits); this.CreditPoints = 0; } } }
public void Start() { IsStarted = true; HappinessLevel = new MoodLevel { Value = 1 }; HungrinessLevel = new MoodLevel { Value = 1 }; ThirstinessLevel = new MoodLevel { Value = 1 }; CreditPoints = 0; ScheduleNextMoodChange(15); }