Music and Audio Effects – Example
function love.mousepressed(x, y, button)
if button == 1 then
if CheckClick(550,200,128,128,x,y) then
love.audio.play(audio_super)
end
if CheckClick(100,200,128,128,x,y) then
love.audio.play(audio_1up)
end
elseif button == 2 then
if CheckClick(550,200,128,128,x,y) then
love.audio.stop(audio_super)
end
if CheckClick(100,200,128,128,x,y) then
love.audio.stop(audio_1up)
end
end
end