Hey,
I want to have background music for my game.
It starts exactly how it should but i would like to have a different music for the next level.
How can I proof which level is currently played, so i can have an if statement to place the stopMusic in ?
RIght now my code looks like this:
GreenfootSound hintergrundmusikhalloween = new GreenfootSound("HalloweenMusik.mp3");
public void act()
{
startMusikLevel1();
if (Greenfoot.setWorld(Level3)==true)!!!!!!!!! THIS DOES'NT WORK !
{
stoppMusikLevel1();
}
}
public void stoppMusikLevel1()
{
hintergrundmusikhalloween.pause();
}
public void startMusikLevel1()
{
hintergrundmusikhalloween.play();
hintergrundmusikhalloween.setVolume(25);
}
