From 8c7ebe2c56804b6a9fe24d087453b8682aee52f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 6 Jan 2015 12:23:37 +0100 Subject: StateSelect: unselect on touchUp before reselecting if appropriate --- core/src/ch/asynk/tankontank/game/states/StateSelect.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 7573132..fa3711d 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -51,13 +51,14 @@ public class StateSelect extends StateCommon @Override public void touchDown() { - if (selectedHex != null) - map.unselectHex(selectedHex); } @Override public void touchUp() { + if (selectedHex != null) + map.unselectHex(selectedHex); + if (!isEnemy) { if (map.possibleMoves.contains(upHex)) { // quick move -- cgit v1.1-2-g2b99