diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-18 14:41:46 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-18 14:41:46 +0100 |
commit | 3f565c31f0738b40e41471d33cb693da5d315056 (patch) | |
tree | fb8a99a9fbab10e00f1fa7634fc5e5d356c3dfeb | |
parent | c92e902364a3e7549f61ba5a29bf9c9fca429305 (diff) | |
download | RustAndDust-3f565c31f0738b40e41471d33cb693da5d315056.zip RustAndDust-3f565c31f0738b40e41471d33cb693da5d315056.tar.gz |
StateDeployment,Ctrl: clean up deployment completness procedure
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 11 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateDeployment.java | 5 |
2 files changed, 5 insertions, 11 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 7b96ae5..6a6dad5 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -146,11 +146,6 @@ public abstract class Ctrl implements Disposable stateAfterAnimation = after; } - public void unitDeployed() - { - battle.actionDone(); - } - // Hud callbacks public void endGame() @@ -166,7 +161,7 @@ public abstract class Ctrl implements Disposable public void endDeployment() { - setState(StateType.DONE); + this.state.execute(); turnDone(); } @@ -244,8 +239,10 @@ public abstract class Ctrl implements Disposable private StateType completeDeployment() { + if (battle.isDeploymentDone()) + hud.askEndDeployment(); battle.actionDone(); - return this.state.execute(); + return StateType.DEPLOYMENT; } private StateType abortAction() diff --git a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java index a209b87..97acf9e 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java @@ -123,9 +123,6 @@ public class StateDeployment extends StateCommon map.hexDirectionsHide(selectedHex); ctrl.hud.actionButtons.hide(); ctrl.hud.playerInfo.unitDock.show(); - if (ctrl.battle.isDeploymentDone()) - ctrl.hud.askEndDeployment(); - else - ctrl.unitDeployed(); + ctrl.setState(StateType.DONE); } } |