This site requires JavaScript, please enable it in your browser!
Greenfoot back
senga9872
senga9872 wrote ...

2016/5/26

How do I close one world and open another?

senga9872 senga9872

2016/5/26

#
How do I close one world and open another, for my game I want to close the start screen and open the main game. My issue is it will run the act() method from the game once then go to the one in the start screen, hindering continuation. Please help,thanks.
Super_Hippo Super_Hippo

2016/5/26

#
It could be like this in the start screen act method:
if (Greenfoot.mousePressed(null))
{
   Greenfoot.setWorld(new MainGame());
}
You need to login to post a reply.