Guest User

Untitled

a guest
Jan 6th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public static void Update()
  2. {
  3. if (_loop == null)
  4. {
  5. LoadContent(_content);
  6. }
  7.  
  8. if (_intro == null || _loop == null)
  9. {
  10. return;
  11. }
  12.  
  13. if (NextTrack != null)
  14. {
  15. DesiredVolume = 0;
  16.  
  17. if (CurrentVolume < 0.01f)
  18. {
  19. DesiredVolume = CurrentVolume = 1;
  20. StopMusic();
  21. PlayTrack(NextTrack);
  22. NextTrack = null;
  23. }
  24. }
  25.  
  26. CurrentVolume = MathHelper.Lerp(CurrentVolume, DesiredVolume, _volumechangerate);
  27.  
  28. if (_intro != null)
  29. {
  30. _intro.Volume = Global.MusicVolume*CurrentVolume;
  31. }
  32.  
  33. if (_loop != null)
  34. {
  35. _loop.Volume = Global.MusicVolume*CurrentVolume;
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment