it seems that the demo stage fixes the problem using the following lines of code in onTick():
Code: Select all
if (Audio.MusicIsPlaying() == false and not isWinning) then
Audio.MusicOpen("The Heist.ogg")
Audio.MusicPlay()
end
in order to make sure the music still properly cuts out at the end, this is done in onEvent() when the event named "end" is triggered:
Code: Select all
if(calledEvent == "end") then
Audio.MusicStop()
isWinning = true
end