diff options
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 8 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateDeployment.java | 8 |
2 files changed, 3 insertions, 13 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 36aa96f..4bedf83 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -146,14 +146,6 @@ public abstract class Ctrl implements Disposable stateAfterAnimation = after; } - public boolean checkDeploymentDone() - { - boolean done = battle.isDeploymentDone(); - if (done) - hud.askEndDeployment(); - return done; - } - // Hud callbacks public void endGame() diff --git a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java index 0afc4ee..1abac5a 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateDeployment.java @@ -9,7 +9,6 @@ import ch.asynk.rustanddust.game.hud.ActionButtons.Buttons; public class StateDeployment extends StateCommon { - private boolean completed; private Zone entryZone; private UnitList deployedUnits = new UnitList(10); @@ -18,7 +17,6 @@ public class StateDeployment extends StateCommon { if (selectedHex != null) map.hexUnselect(selectedHex); - completed = false; entryZone = null; selectedHex = null; selectedUnit = null; @@ -60,7 +58,7 @@ public class StateDeployment extends StateCommon showEntryZone(unit); } else if (selectedUnit != null) { deployUnit(Orientation.fromAdj(selectedHex, hex)); - } else if (!completed && (entryZone != null) && (hex != null)) { + } else if (!ctrl.battle.isDeploymentDone() && (entryZone != null) && (hex != null)) { if (hex.isEmpty() && entryZone.contains(hex)) { showUnit(activeUnit, hex); } @@ -125,7 +123,7 @@ public class StateDeployment extends StateCommon map.hexDirectionsHide(selectedHex); ctrl.hud.actionButtons.hide(); ctrl.hud.playerInfo.unitDock.show(); - if (ctrl.checkDeploymentDone()) - completed = true; + if (ctrl.battle.isDeploymentDone()) + ctrl.hud.askEndDeployment(); } } |