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!!
1 2 3 4 5 6 7 8 9 10 11 12 | public void act() { removeButtons(); } public void removeButtons() { if (Greenfoot.mouseClicked( this )) { getWorld().removeObject( this ); clear(Scenario2. class ); } } } |