Hi,
I'm using the following code in order to change the World in my game
This works as long as I open the game in Greenfoot, but as soon as I export it it just stops running instead of changing the world. This happens only with some of my worlds, some others work.
What could be the reason and what could I do to resolve the problem?
Thanks.
public void nextlevel(World level)
{
play=false;
if(Greenfoot.isKeyDown("space"))
{
play=true;
Greenfoot.setWorld(level);
}
}