public void musicClicked() { // Mutes/unmutes music // checks to see if mute/unmute button is clicked if (muteB.clicked(mx, my, true) && pause == true && musicOn == true) { clickedSound(); musicOn = false; clicked.stop(); bckGrndMusic.stop(); coinSound.stop(); starSound.stop(); bounce.stop(); } else if (unmuteB.clicked(mx, my, true) && pause == true && musicOn == false) { clickedSound(); musicOn = true; bckGrndMusic.loop(); } }
public void stopMusic() { // stops the background music bckGrndMusic.stop(); on = false; }