summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-14 11:54:32 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-14 11:54:32 +0100
commitcd81f698fc921dcaa36b77658135e11895668b31 (patch)
treed48a14d091d4299ca7aeecffd796941404079af8 /core/src
parent3c3882560b5888f193858a58b1d03ff5bca3c199 (diff)
downloadRustAndDust-cd81f698fc921dcaa36b77658135e11895668b31.zip
RustAndDust-cd81f698fc921dcaa36b77658135e11895668b31.tar.gz
StateCommon: remove clearAll()
Diffstat (limited to 'core/src')
-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;
}