I have a game with a mouse and a spider. When the cursor (or mouse) clicks on the spider, it should disappear. It's not working, obviously. Help me? The code looks like this.
public void clickSpider()
{
if(Greenfoot.mouseClicked(spider))
{
getWorld().removeObject(spider);
}
}
ps. I am a very VERY new programmer.