summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-15 17:36:25 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-15 17:36:25 +0100
commit34b404cc8d58043ea63ce7daaad11c1e560ff7e1 (patch)
treec8328e7bd8fcbecdab2074007018c7d63ff1fc00 /core
parent149bb7ac1903a81689ab1ce214c1b30aebf07f81 (diff)
downloadRustAndDust-34b404cc8d58043ea63ce7daaad11c1e560ff7e1.zip
RustAndDust-34b404cc8d58043ea63ce7daaad11c1e560ff7e1.tar.gz
StateRotate: doRotation sets after animation state
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateRotate.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StateRotate.java b/core/src/ch/asynk/tankontank/game/states/StateRotate.java
index 9164154..130e259 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
@Override
public StateType done()
{
- ctrl.setAfterAnimationState(doRotation(o));
+ doRotation(o);
return StateType.ANIMATION;
}
@@ -97,7 +97,7 @@ public class StateRotate extends StateCommon
map.showOrientation(to, o);
ctrl.hud.actionButtons.show(Buttons.ROTATE.b | Buttons.DONE.b | ((ctrl.cfg.canCancel) ? Buttons.ABORT.b : 0));
} else {
- ctrl.setAfterAnimationState(doRotation(o));
+ doRotation(o);
ctrl.setState(StateType.ANIMATION);
}
}
@@ -107,15 +107,15 @@ public class StateRotate extends StateCommon
map.hideMoveablePawns();
}
- private StateType doRotation(Orientation o)
+ private void doRotation(Orientation o)
{
StateType whenDone = StateType.DONE;
ctrl.hud.notify("Move " + activeUnit);
- ctrl.setAnimationCount(1);
if (map.movePawn(activeUnit, o) > 0)
whenDone = StateType.MOVE;
- return whenDone;
+ ctrl.setAnimationCount(1);
+ ctrl.setAfterAnimationState(whenDone);
}
}