summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-28 17:17:59 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-28 17:17:59 +0100
commit94d0faf3bd5736acb4b14d135c03464424905484 (patch)
tree04b3d7a1df9e6175ccf26f675d51b6c76530eb9c /core/src
parentcc91d08a4afd616101a69a94d8e52ac2314afc27 (diff)
downloadRustAndDust-94d0faf3bd5736acb4b14d135c03464424905484.zip
RustAndDust-94d0faf3bd5736acb4b14d135c03464424905484.tar.gz
Ctrl: code reorder
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java5
-rw-r--r--core/src/ch/asynk/rustanddust/game/ctrl/Solo.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 1b21e09..cefbb0f 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -70,8 +70,6 @@ public abstract class Ctrl implements Disposable
this.game = game;
this.battle = battle;
this.hud = new Hud(game);
- battle.init(this);
- init();
this.blockMap = false;
this.blockHud = false;
@@ -90,8 +88,9 @@ public abstract class Ctrl implements Disposable
this.state = selectState;
this.stateType = StateType.DONE;
- StateCommon.set(game);
+ init();
+ StateCommon.set(game);
hud.update();
this.hud.notify(battle.toString(), 2, Position.MIDDLE_CENTER, false);
diff --git a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
index 4c71bc0..a2b5be1 100644
--- a/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
+++ b/core/src/ch/asynk/rustanddust/game/ctrl/Solo.java
@@ -12,7 +12,10 @@ public class Solo extends Ctrl
}
@Override
- public void init() { }
+ public void init()
+ {
+ battle.init(this);
+ }
@Override
protected void processTurn() { }