I want to make a restart button, which moves all the objects move back to their original places
How do I set multiple different objects back to their original places at the same time?
Have an object in your world by adding it, and that has method inside of that object that has something like this,
public reset()
{
reset();
}
public void reset()
{
if(Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(new GameStart); //starts a new world
}
}
Have an object in your world by adding it, and that has method inside of that object that has something like this,
public reset()
{
reset();
}
public void reset()
{
if(Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(new GameStart); //starts a new world
}
}