diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-18 07:52:03 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-18 07:52:03 +0200 |
commit | 584548bde40ef060473a72f36715b0deb1dc4838 (patch) | |
tree | d5ace7a0ed57eaea8347df3b43d6e190efef0286 /core/src/ch/asynk | |
parent | 92137bf36283ad1c5d972b138484b02cc5c3ce7a (diff) | |
download | RustAndDust-584548bde40ef060473a72f36715b0deb1dc4838.zip RustAndDust-584548bde40ef060473a72f36715b0deb1dc4838.tar.gz |
Ctrl: map must be created before states
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 867e88a..b0f383d 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -38,6 +38,11 @@ public class Ctrl implements Disposable this.cfg = game.config; game.ctrl = this; + this.player = battle.getFirstPlayer(); + this.opponent = battle.getSecondPlayer(); + this.map = battle.getMap(); + battle.setup(map, player, opponent); + this.selectState = new StateSelect(this, map); this.pathState = new StateMove(); this.rotateState = new StateRotate(); @@ -47,11 +52,6 @@ public class Ctrl implements Disposable this.state = selectState; - this.player = battle.getFirstPlayer(); - this.opponent = battle.getSecondPlayer(); - this.map = battle.getMap(); - battle.setup(map, player, opponent); - this.hud = new Hud(this, game); player.turnStart(); |