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

2018/6/21

Why am I getting an error?

1
2
3
danpost danpost

2018/6/21

#
Now that you made look search for it, I find you are having the gardener, which is controlled by the player, add a snowman into the world. Remove what you added in your GreeneryWorld class as far as adding a snowman and change this line in the Gardener class:
if (Greenfoot.isKeyDown("f")){
to this:
if (Greenfoot.isKeyDown("f") && getWorld().getObjects(Snowman.class).isEmpty()){
You need to login to post a reply.
1
2
3