You could add the possibility to save the highscore of the user. If you don't know where to start, you can take a look at this course:
http://www.2shared.com/document/fK0wPwlQ/Learning_Greenfoot_22.html
If you're using it in your scenarios, I would appreciate it if you would add those scenarios to this collection:
http://www.greenfoot.org/collections/314
I hope you like it!
I tested it (I don't know why :) ), and if I said spin() and right(), the character will always be stuck at the right side of the world. I give you this tip:
Instead of this code for right:
[code]public void right()
{
setLocation(getX() + 5, getY());
}[/code]
use this:
[code]public void right()
{
move(5);
}[/code]
And do this for left():
[code]
public void right()
{
move(-5);
}[/code]
I hope this helps.
If you want, you can checkout my scenario Libary, which is basically a scenario with some great APIs. You can use that in this scenario if you want so.
In your readme 'file', you say things like "up(); moves the Class up.". That's not true. up() isn't a class/static method, so it can't do anything with the class. You need to say "up(); moves the object up.", because you call the methods you created to objects, not to classes.
By the way, you do this in gotomouse():
if (Greenfoot.mouseMoved(null) ) {
MouseInfo mouse = Greenfoot.getMouseInfo();
setLocation (mouse.getX(), mouse.getY());
}
It's better to do this:
if (Greenfoot.mouseMoved(null) ) {
MouseInfo mouse = Greenfoot.getMouseInfo();
if (mouse == null) return;
setLocation (mouse.getX(), mouse.getY());
}
Now, you return if the mouse info isn't available. When you do this, you have less chrashes.
(little tip: change gotomouse() to goToMouse(), more readable ;) )
I hope this helps!
2012/4/14
2012/4/14
2012/4/14
2012/4/14
2012/4/24
2012/4/25
2012/5/4
2012/5/4