From d85ff81508cc5296bc20dcad4d0bf22cf8323854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 28 Nov 2014 19:58:09 +0100 Subject: StateMove,StateSelect: fix notifications --- core/src/ch/asynk/tankontank/game/states/StateMove.java | 1 + core/src/ch/asynk/tankontank/game/states/StateSelect.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/game/states/StateMove.java b/core/src/ch/asynk/tankontank/game/states/StateMove.java index 1aa91e3..d7d8dd6 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateMove.java +++ b/core/src/ch/asynk/tankontank/game/states/StateMove.java @@ -144,6 +144,7 @@ public class StateMove extends StateCommon map.selectHex(hex); activeUnit.enableOverlay(Unit.MOVE, false); checkExit(activeUnit, hex); + ctrl.hud.notify(activeUnit.toString()); } private int collectPaths(Hex hex) diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 7ce6251..d097e0f 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -90,6 +90,7 @@ public class StateSelect extends StateCommon isEnemy = ctrl.player.isEnemy(unit); if (!isEnemy && (unit == selectedUnit)) { if (unit.isHq()) { + ctrl.hud.notify("HQ activation"); select(upHex, unit, isEnemy); ctrl.setState(StateType.MOVE); } else { @@ -99,6 +100,7 @@ public class StateSelect extends StateCommon } } else { select(upHex, unit, isEnemy); + ctrl.hud.notify(selectedUnit.toString()); } } @@ -118,7 +120,6 @@ public class StateSelect extends StateCommon showPossibilities(selectedUnit); ctrl.hud.actionButtons.show((ctrl.player.canPromote(selectedUnit)) ? Buttons.PROMOTE.b : 0 ); - ctrl.hud.notify(selectedUnit.toString()); TankOnTank.debug(" select " + selectedHex + selectedUnit + (isEnemy ? " enemy " : " friend ")); } } -- cgit v1.1-2-g2b99