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

2016/10/28

getMouseClick

Everardo_Chao Everardo_Chao

2016/10/28

#
I am new in greenfoot and I wonder if help me to use getMouseClick because I need to give a click on a screen and I switch to another
Super_Hippo Super_Hippo

2016/10/28

#
Are the two "screens" worlds? So you are in one and if it is clicked, it should move to the other? Then this can be used in the first world:
public void act()
{
    if (Greenfoot.mouseClicked(null))
    {
        Greenfoot.setWorld(new World2());
    }
}
Everardo_Chao Everardo_Chao

2016/10/28

#
thank you very much!
You need to login to post a reply.