So when I added this code t my level1 world, it works fine the music plays but there is one thing that happens that I do not like. So when the music endds it does bot loop to the start and another thing is when i go to a new world, via teliports on my game, the music will not stop. I need some help with this please! thank you <3
public Level1() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(5000, 700, 1); backgroundMusic.playLoop(); backgroundMusic.setVolume(40); prepare(); } public void stopped() { backgroundMusic.pause(); } public void started() { backgroundMusic.playLoop(); backgroundMusic.setVolume(40); }