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

What is happening right now?


reply to Finish line

By Super_Hippo - about 1 hour ago
spawning = adding an object to the world You have to replace line 1 of your last shown code with the line given.

reply to Jumping

By danpost - about 4 hours ago
¿ques♫ wrote...
Thanks, this works really well. Should I use the dy strategy for collision detection under objects? I am trying to modify the moveVertically() method so that if Mario jumps and hits an object above him, he bounces off of it and comes back down. Do you have any suggestions on how to do this, or can I find answers in your "Jump and Run Demo w/Moving Platform" demo?
Yes. You will find the answers there. It is the part labelled: <Code Omitted>in the moveVertically method.

reply to Carry over score in between levels

By danpost - about 4 hours ago
You have a grave misunderstanding about extending classes. An extension to a class, in design, is to modify or sub-classify a type of object. For example, if you had an Insect class, its extensions could feasibly be Fly, Bee, Moth, Locust, JuneBug, etc. All objects created from these extensions are still Insect objects. A Counter object is clearly not a MiddleInvisible object. There are multiple previous discussions dealing with keeping a current score when changing worlds. Do a search and check some out.