summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateBreak.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateEscape.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 882d8f5..14c68d8 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -312,9 +312,8 @@ public abstract class Map extends Board
addAnimation(seq);
}
- public int moveUnit(Unit unit, Orientation o)
+ public int moveUnit(Unit unit)
{
- possiblePaths.orientation = o;
possiblePaths.applyToPawn(0);
movePawn(unit, possiblePaths, notifyDoneAnimation(unit), objectives);
diff --git a/core/src/ch/asynk/tankontank/game/states/StateBreak.java b/core/src/ch/asynk/tankontank/game/states/StateBreak.java
index 034bb0b..2274e82 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateBreak.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateBreak.java
@@ -81,7 +81,7 @@ public class StateBreak extends StateCommon
map.possiblePaths.init(activeUnit);
if (map.possiblePaths.build(to) == 1) {
map.possiblePaths.orientation = o;
- map.moveUnit(activeUnit, o);
+ map.moveUnit(activeUnit);
ctrl.setAnimationCount(1);
ctrl.setAfterAnimationState(StateType.DONE);
} else
diff --git a/core/src/ch/asynk/tankontank/game/states/StateEscape.java b/core/src/ch/asynk/tankontank/game/states/StateEscape.java
index 8996d6b..cc31007 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateEscape.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateEscape.java
@@ -53,6 +53,7 @@ public class StateEscape extends StateCommon
map.possiblePaths.setExit(exitZone.orientation);
else
map.possiblePaths.build(map.getAdjTileAt(unit.getTile(), exitZone.orientation));
+ map.possiblePaths.orientation = exitZone.orientation;
unit.hideMoveable();
map.hidePossibleMoves();
@@ -61,7 +62,7 @@ public class StateEscape extends StateCommon
map.leaveBoard(unit);
ctrl.player.unitEscape(unit);
- if (map.moveUnit(activeUnit, exitZone.orientation) > 0)
+ if (map.moveUnit(activeUnit) > 0)
return StateType.MOVE;
return StateType.DONE;
}
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index 45a02c2..8cf9689 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateRotate.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
@@ -71,7 +71,7 @@ public class StateRotate extends StateCommon
{
StateType whenDone = StateType.DONE;
- if (map.moveUnit(activeUnit, map.possiblePaths.orientation) > 0)
+ if (map.moveUnit(activeUnit) > 0)
whenDone = StateType.MOVE;
ctrl.setAnimationCount(1);