Add function to stop the current music

This commit is contained in:
RedEnchilada 2016-05-16 21:52:27 -05:00
parent 0b9c98dca4
commit 5601c63358

View file

@ -30,6 +30,16 @@ Music = (function() {
currentMusic.volume = Music.volume;
}
Music.stop = function() {
if (!currentMusic) {
return;
}
currentMusic.stop();
currentMusic.destroy();
currentMusic = undefined;
}
Music.fadeout = function(time) {
if (!currentMusic) {
return;