DEADSOFTWARE

Add world saving
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / GameProc.java
index dfe4d6bdd306f6a6c139a1a52f00d19283705bc2..a4a6c94f698892faf86e7fd98cd3f30a27e7a088 100644 (file)
@@ -31,7 +31,12 @@ public class GameProc {
     public long touchDownTime;
 
     public GameProc() {
-        world = new GameWorld(1024,256);
+        world = new GameWorld();
+        if (WorldSaver.exists()) {
+            world.load();
+        } else {
+            world.generate(1024, 256);
+        }
         if (CaveGame.TOUCH) {
             renderer = new GameRenderer(this,320,
                     320*((float)GameScreen.getHeight()/GameScreen.getWidth()));