Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Update()
- {
- if (_loop == null)
- {
- LoadContent(_content);
- }
- if (_intro == null || _loop == null)
- {
- return;
- }
- if (NextTrack != null)
- {
- DesiredVolume = 0;
- if (CurrentVolume < 0.01f)
- {
- DesiredVolume = CurrentVolume = 1;
- StopMusic();
- PlayTrack(NextTrack);
- NextTrack = null;
- }
- }
- CurrentVolume = MathHelper.Lerp(CurrentVolume, DesiredVolume, _volumechangerate);
- if (_intro != null)
- {
- _intro.Volume = Global.MusicVolume*CurrentVolume;
- }
- if (_loop != null)
- {
- _loop.Volume = Global.MusicVolume*CurrentVolume;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment