public override void Update(GameTime gameTime)
{
base.Update(gameTime);
if (mood <= LOW_MOOD_LEVEL)
{
if (lowMoodWarningTimer == 0 && MoodSwing.GetInstance().BGM.Count == 3)
{
MoodSwing.GetInstance().BGM = new Queue<Song>();
Queue<Song> bgm = MoodSwing.GetInstance().BGM;
bgm.Enqueue(Game.Content.Load<Song>("DefendroThemeB"));
MediaPlayer.Stop();
Song nextSong = bgm.Dequeue();
MediaPlayer.Play(nextSong);
bgm.Enqueue(nextSong);
MoodSwing.GetInstance().Notifier.InvokeNotification("Warning: The district is in a bad mood.");
lowMoodWarningTimer = LOW_MOOD_WARNING_DELAY;
}
else
lowMoodWarningTimer--;
}
else
{
if (MoodSwing.GetInstance().BGM.Count == 1)
{
MoodSwing.GetInstance().BGM = new Queue<Song>();
Queue<Song> bgm = MoodSwing.GetInstance().BGM;
bgm.Enqueue(Game.Content.Load<Song>("MoodSwing"));
bgm.Enqueue(Game.Content.Load<Song>("7thFloor"));
bgm.Enqueue(Game.Content.Load<Song>("Bliss"));
MediaPlayer.Stop();
Song nextSong = bgm.Dequeue();
MediaPlayer.Play(nextSong);
bgm.Enqueue(nextSong);
}
}
}