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

2011/4/29

Mouse

Almog Almog

2011/4/29

#
I make a game in greenfoot, and I have a problem that I need some objects will check if the mouse click them, and I don't know to do this. pre-thank
webmessia webmessia

2011/4/29

#
Inside the objects act method use
if( Greenfoot.mouseClicked(this) ){
    //Run code when clicked here
}
Almog Almog

2011/4/29

#
Oh... Thanks This exactlly what I need
You need to login to post a reply.