This commit is contained in:
Anuken
2020-03-07 10:27:29 -05:00
parent 7655b65363
commit 1e0067d64b
5 changed files with 19 additions and 5 deletions

View File

@@ -100,7 +100,12 @@ public class MusicControl{
/** Plays and fades in a music track. This must be called every frame.
* If something is already playing, fades out that track and fades in this new music.*/
private void play(@Nullable Music music){
if(!shouldPlay()) return;
if(!shouldPlay()){
if(current != null){
current.setVolume(0);
}
return;
}
//update volume of current track
if(current != null){