I can't get the HealthDot to be removed.
public void checkHealth()
{
World myWorld = getWorld();
Actor myDot = new HealthDot1();
if (health == 3)
{
myWorld.addObject(new HealthDot1(), 10, 10);
myWorld.addObject(new HealthDot2(), 20, 10);
myWorld.addObject(new HealthDot3(), 30, 10);
}
if (health == 2)
{
//Here an error "cannot find symbol - method HealthDot1()" occurs.
myWorld.removeObject(HealthDot1());
}
if (health == 1)
{
}
if (health == 0)
{
getWorld().addObject(new GameOver(), 200, 200);
Greenfoot.stop();
}
}
