I am making games in greenfoot, and wanted to make a ingame shop spending points earned from playing, but I cant find out if it is possible to save the game state? Please help!


1 | Greenfoot.setWorld( new ShopWorld( this )); |
1 2 3 4 5 6 7 8 9 10 11 | // instance variable private World mainWorld; // constructor public ShopWorld(World world) { super ( 600 , 400 , 1 ); // whatever mainWorld = world; // other code } // when conditions are right to return Greenfoot.setWorld(mainWorld); |