If I have a pause button in my game and pressing it takes you to the "Pause menu" (a different world), is there a simple way to make the game continue from where it left off back in the Game world? Thanks.
// In PauseWorld
private World gameWorld;
public PauseWorld(World world) {
gameWorld = world;
}
// in GameWorld when switching to PauseWorld
Greenfoot.setWorld(new PauseWorld(this));
// in PauseWorld when switching back
Greenfoot.setWorld(gameWorld);// In PauseWorld
private World gameWorld;
public PauseWorld(World world) {
gameWorld = world;
}
// in GameWorld when switching to PauseWorld
Greenfoot.setWorld(new PauseWorld(this));
// in PauseWorld when switching back
Greenfoot.setWorld(gameWorld);if (Greenfoot.isKeyDown("q"))
{
Greenfoot.setWorld(new PauseMenu());
}