Hi i want to remove an object when i click whit the mouse, and then add a new object randomly after.
this is my code
public void act()
{
// Add your action code here.
if(canSee(fisk1.class))
{
eat(fisk1.class);
fisk1 fisk = new fisk1();
world.addObject(new fisk1(),Greenfoot.getRandomNumber(400), Greenfoot.getRandomNumber(500));
}
}
i get this erro
can not find symbol - method addObject(fisk1, int, int)
can i only use addObject in world??