summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateCommon.java8
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java6
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;
}