//-------------------------------------------------------------------------- private void PlayFastMusic() { if (backgroundMusicSlow) { backgroundMusicSlow.Pause(); } backgroundMusicFast = SoundPlayer.Instance.PlaySound(SoundConst.BACKGROUND_MUSIC_RUSH); backgroundMusicFast.Volume = 1.0f; backgroundMusicFast.Loop(); }
//-------------------------------------------------------------------------- private void PlaySlowMusic() { if (!backgroundMusicSlow) { backgroundMusicSlow = SoundPlayer.Instance.PlaySound(SoundConst.BACKGROUND_MUSIC_SLOW); backgroundMusicSlow.Volume = 1.0f; backgroundMusicSlow.Loop(); } else { if (backgroundMusicFast) { backgroundMusicFast.AnimateFade(0.3f, true); backgroundMusicFast = null; } backgroundMusicSlow.Play(); } }