summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-03-29 10:34:15 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-03-29 10:34:15 +0200
commitfc55db1a19caf808780b9749948de8da1b787940 (patch)
treeffc0045e223b4564be32d259df3428220189bd67 /core/src
parent576ac0551d9eda34c1ff73d4400380e10b567e76 (diff)
downloadRustAndDust-fc55db1a19caf808780b9749948de8da1b787940.zip
RustAndDust-fc55db1a19caf808780b9749948de8da1b787940.tar.gz
StateEngage: simplify, do not recompute
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/game/states/StateEngage.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java
index 267d4d5..56e0fd2 100644
--- a/core/src/ch/asynk/rustanddust/game/states/StateEngage.java
+++ b/core/src/ch/asynk/rustanddust/game/states/StateEngage.java
@@ -9,15 +9,9 @@ public class StateEngage extends StateCommon
@Override
public void enterFrom(StateType prevState)
{
- map.unitsTargetClear();
-
- // activeUnit is the target
if (prevState == StateType.SELECT) {
+ // activeUnit will be target
activeUnit = null;
- // use selectedHex and selectedUnit
- map.unitsTargetHide();
- map.collectTargets(selectedUnit, ctrl.battle.getOpponent().units);
- map.unitsTargetShow();
if (to != null) {
// quick fire -> replay touchUp
touch(to);