From 9bf546c98ce624417f12765437491070de1ddea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 7 Dec 2015 16:33:36 +0100 Subject: Map: pathsToggleHex(Hex) swallows togglePathOverlay(Hex) --- core/src/ch/asynk/rustanddust/game/Map.java | 8 ++------ core/src/ch/asynk/rustanddust/game/states/StateMove.java | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Map.java b/core/src/ch/asynk/rustanddust/game/Map.java index 6a5c8a9..d11525a 100644 --- a/core/src/ch/asynk/rustanddust/game/Map.java +++ b/core/src/ch/asynk/rustanddust/game/Map.java @@ -180,6 +180,8 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS public int pathsToggleHex(Hex hex) { + boolean enable = !hex.isOverlayEnabled(Hex.MOVE); + enableOverlayOn(hex, Hex.MOVE, enable); return paths.toggleCtrlTile(hex); } @@ -517,12 +519,6 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS // SHOW / HIDE - public void togglePathOverlay(Hex hex) - { - boolean enable= !hex.isOverlayEnabled(Hex.MOVE); - enableOverlayOn(hex, Hex.MOVE, enable); - } - public enum UnitType { MOVEABLE, diff --git a/core/src/ch/asynk/rustanddust/game/states/StateMove.java b/core/src/ch/asynk/rustanddust/game/states/StateMove.java index 762c476..6410c67 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateMove.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateMove.java @@ -173,7 +173,6 @@ public class StateMove extends StateCommon // } else { map.pathsHide(); - map.togglePathOverlay(hex); s = map.pathsToggleHex(hex); map.pathsShow(); } -- cgit v1.1-2-g2b99