This site requires JavaScript, please enable it in your browser!
Greenfoot back
kris10wb@gmail.com
kris10wb@gmail.com wrote ...

2017/10/20

Switch World..

kris10wb@gmail.com kris10wb@gmail.com

2017/10/20

#
did someone know the code on how to display another world? like before the game starts... it displays a startworld and also have a code in it that when clicked.. it will proceed to the actual game?
Super_Hippo Super_Hippo

2017/10/20

#
Use the 'Greenfoot.setWorld' method. Something like this in your start world:
public void act()
{
    if (Greenfoot.mousePressed(null))
    {
        Greenfoot.setWorld(new PlayWorld());
    }
}
kris10wb@gmail.com kris10wb@gmail.com

2017/11/16

#
thanksss :)
You need to login to post a reply.