From 375b1da1637c9eaf2c84d4cdc6db5670567fed33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 16 Nov 2014 01:44:07 +0100 Subject: StateDeployment,Ctrl: add done button --- core/src/ch/asynk/tankontank/game/Ctrl.java | 5 +++++ core/src/ch/asynk/tankontank/game/states/StateDeployment.java | 1 + 2 files changed, 6 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index dbe8817..4067806 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -154,6 +154,11 @@ public class Ctrl implements Disposable { StateType nextState = this.state.done(); + if (stateType == StateType.DEPLOYMENT) { + switchPlayer(); + return nextState; + } + if (nextState == StateType.DONE) { if (map.activatedPawns.size() > 0) { TankOnTank.debug("burn down 1AP"); diff --git a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java index 222ea67..299fdfa 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateDeployment.java +++ b/core/src/ch/asynk/tankontank/game/states/StateDeployment.java @@ -131,6 +131,7 @@ public class StateDeployment extends StateCommon selectedUnit = null; if (ctrl.checkDeploymentDone()) { done = true; + ctrl.hud.actionButtons.show(Buttons.DONE.b); } } } -- cgit v1.1-2-g2b99