From cd81f698fc921dcaa36b77658135e11895668b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 14 Nov 2014 11:54:32 +0100 Subject: StateCommon: remove clearAll() --- core/src/ch/asynk/tankontank/game/states/StateCommon.java | 8 -------- core/src/ch/asynk/tankontank/game/states/StateSelect.java | 6 ++++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/states/StateCommon.java b/core/src/ch/asynk/tankontank/game/states/StateCommon.java index d88d25b..402bd50 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateCommon.java +++ b/core/src/ch/asynk/tankontank/game/states/StateCommon.java @@ -32,14 +32,6 @@ public abstract class StateCommon implements State this.map = map; } - public void clearAll() - { - to = null; - selectedHex = null; - selectedUnit = null; - activeUnit = null; - } - public boolean downInMap(float x, float y) { downHex = map.getHexAt(x, y); diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java index 13130b0..298c512 100644 --- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java +++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java @@ -14,7 +14,10 @@ public class StateSelect extends StateCommon @Override public void enter(StateType prevState) { - clearAll(); + to = null; + selectedHex = null; + selectedUnit = null; + activeUnit = null; map.clearAll(); } @@ -82,7 +85,6 @@ public class StateSelect extends StateCommon if (selectedHex != null) map.unselectHex(selectedHex); hidePossibleTargetsMovesAssists(); - clearAll(); map.clearAll(); return StateType.ABORT; } -- cgit v1.1-2-g2b99