diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateCommon.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StateMove.java | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateCommon.java b/core/src/ch/asynk/tankontank/game/states/StateCommon.java index 6361eb7..725e86a 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateCommon.java +++ b/core/src/ch/asynk/tankontank/game/states/StateCommon.java @@ -69,6 +69,7 @@ public abstract class StateCommon implements State if (ctrl.cfg.showMoves && unit.canMove()) map.showPossibleMoves(); if (ctrl.cfg.showTargets && unit.canEngage()) map.showPossibleTargets(); if (ctrl.cfg.showMoveAssists && unit.canMove()) map.showMoveableUnits(); + unit.enableOverlay(Unit.MOVE, false); } protected void hidePossibilities() diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index 0b90188..0e83782 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -41,6 +41,7 @@ public class StateMove extends StateCommon changeUnit(map.moveableUnits.get(0)); } } + activeUnit.enableOverlay(Unit.MOVE, false); } @Override @@ -125,17 +126,20 @@ public class StateMove extends StateCommon private void changeUnit(Unit unit) { - if (activeUnit != null ) + if (activeUnit != null ) { map.unselectHex(activeUnit.getHex()); + activeUnit.enableOverlay(Unit.MOVE, true); + } activeUnit = unit; Hex hex = activeUnit.getHex(); map.possiblePaths.init(activeUnit, hex); - map.selectHex(hex); activeUnit.showMoveable(); map.hidePossibleMoves(); map.collectPossibleMoves(activeUnit); map.showPossibleMoves(); - checkExit(activeUnit, activeUnit.getHex()); + map.selectHex(hex); + activeUnit.enableOverlay(Unit.MOVE, false); + checkExit(activeUnit, hex); } private int collectPaths(Hex hex) |