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

2012/5/20

World Switching

thefutureisnow thefutureisnow

2012/5/20

#
Hello world, I was wondering how I can switch which world I'm using, for instance, I'm making a menu, how do I make it that if I press the "Instructions" actor, that it will switch to the "Instructions_Menu" world? Thanks!
danpost danpost

2012/5/20

#
In the "Instructions" actor act() method, put what you just said there.
if (Greenfoot.mouseClicked(this)) Greenfoot.setWorld(new "Instructions_Menu"())
That is a bit of pseudo-code, but it is what you said.
thefutureisnow thefutureisnow

2012/5/20

#
Thanks!
You need to login to post a reply.