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

2014/3/12

How do i create a button to work in my game?

hannah_copeland hannah_copeland

2014/3/12

#
I created a game and in order to start the next level i need there to be a button that when it has be clicked on the screen will change. Not very sure on how to do this at all.
danpost danpost

2014/3/12

#
Create an actor; give it the image you want;, give it the behavior, using the 'act' method, to respond, by changing worlds or setting the the current world anew, to mouse clicks.
hannah_copeland hannah_copeland

2014/3/12

#
i don't know how to change worlds?
danpost danpost

2014/3/12

#
Use the Greenfoot class method 'setWorld'. Refer to the documentation.
hannah_copeland hannah_copeland

2014/3/12

#
okay, i will try this tomorrow
AWESOME-CODING AWESOME-CODING

2014/3/12

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