So I'm VERY new to Greenfoot and for a project, I need to click on one object and have that object and two other objects deleted at the same time. The objects are titled: Scenario1, Scenario2, and Scenario3. I'm writing this code inside of Scenario1 and it's not working. Please help if you can!!
public void act()
{
removeButtons();
}
public void removeButtons() {
if(Greenfoot.mouseClicked(this)) {
getWorld().removeObject(this);
clear(Scenario2.class);
}
}
}
