summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-17 15:51:29 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-17 15:51:29 +0100
commit624fc8b61f909e95ec42c0eb5ab17be2e63e4c46 (patch)
tree9fc928f90fdd4907e931b418452f03d19cf71c55
parent2c83bb0883c70ab0fff1b20cf6dedc3407e220e3 (diff)
downloadRustAndDust-624fc8b61f909e95ec42c0eb5ab17be2e63e4c46.zip
RustAndDust-624fc8b61f909e95ec42c0eb5ab17be2e63e4c46.tar.gz
StateEngage,StateSelect: call Player.unitsAsPawns()
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateEngage.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateEngage.java b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
index 4b1539b..0ef213d 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateEngage.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateEngage.java
@@ -19,7 +19,7 @@ public class StateEngage extends StateCommon
activeUnit = null;
// use selectedHex and selectedUnit
map.hidePossibleTargets();
- map.collectPossibleTargets(selectedUnit, ctrl.opponent.units);
+ map.collectPossibleTargets(selectedUnit, ctrl.opponent.unitsAsPawns());
map.showPossibleTargets();
if (to != null) {
// quick fire -> replay touchUp
@@ -89,7 +89,7 @@ public class StateEngage extends StateCommon
to = upHex;
activeUnit = unit;
activeUnit.showTarget();
- map.collectAttackAssists(selectedUnit, activeUnit, ctrl.player.units);
+ map.collectAttackAssists(selectedUnit, activeUnit, ctrl.player.unitsAsPawns());
map.showAttackAssists();
ctrl.hud.actionButtons.show(Buttons.ENGAGE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0));
}
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
index 7bdc815..ae70328 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
@@ -77,9 +77,9 @@ public class StateSelect extends StateCommon
int moves = map.collectPossibleMoves(selectedUnit);
int targets = 0;
if (isEnemy)
- targets = map.collectPossibleTargets(selectedUnit, ctrl.player.units);
+ targets = map.collectPossibleTargets(selectedUnit, ctrl.player.unitsAsPawns());
else
- targets = map.collectPossibleTargets(selectedUnit, ctrl.opponent.units);
+ targets = map.collectPossibleTargets(selectedUnit, ctrl.opponent.unitsAsPawns());
if (moves > 0)
map.collectMoveablePawns(selectedUnit);
showPossibilities(selectedUnit);