summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/zproject/ZProject.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-06-26 23:49:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-06-28 16:24:17 +0200
commit9f1745efc06f0bab5f65036058f071db570124b8 (patch)
tree05d93e683cc1ca42fcfe716532a6d5d621e021a1 /core/src/ch/asynk/zproject/ZProject.java
parentafa5db087cb0fc28223712cfc4ac4612504bdd69 (diff)
downloadgdx-boardgame-9f1745efc06f0bab5f65036058f071db570124b8.zip
gdx-boardgame-9f1745efc06f0bab5f65036058f071db570124b8.tar.gz
implement Assets
Diffstat (limited to 'core/src/ch/asynk/zproject/ZProject.java')
-rw-r--r--core/src/ch/asynk/zproject/ZProject.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/zproject/ZProject.java b/core/src/ch/asynk/zproject/ZProject.java
index cd25e65..12dc982 100644
--- a/core/src/ch/asynk/zproject/ZProject.java
+++ b/core/src/ch/asynk/zproject/ZProject.java
@@ -17,6 +17,8 @@ public class ZProject extends Game
}
private State state;
+ public final Assets assets = new Assets();
+
@Override public void create()
{
this.state = State.NONE;
@@ -28,6 +30,7 @@ public class ZProject extends Game
@Override public void dispose()
{
switchToNone();
+ assets.dispose();
}
public static void error(String msg)
@@ -51,6 +54,9 @@ public class ZProject extends Game
error("switch from and to " + state);
return;
}
+ switch(state) {
+ case GAME: assets.unloadGame(); break;
+ }
if (state != State.NONE) {
getScreen().dispose();
}
@@ -65,6 +71,8 @@ public class ZProject extends Game
public void switchToGame()
{
+ assets.loadGame();
+ assets.finishLoading();
switchTo(new GameScreen(this), State.GAME);
}
}