summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game/states
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-29 02:11:21 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-29 02:11:21 +0100
commiteae09d2d420e226795b08085afe2cc3c28cd6120 (patch)
tree31372ca093f56327785698be4edcacc513a66f9c /core/src/ch/asynk/tankontank/game/states
parent0af95b0519a78e4959c3645b55b2de7a19d27f59 (diff)
downloadRustAndDust-eae09d2d420e226795b08085afe2cc3c28cd6120.zip
RustAndDust-eae09d2d420e226795b08085afe2cc3c28cd6120.tar.gz
StatePromote,Map: set promote animation
Diffstat (limited to 'core/src/ch/asynk/tankontank/game/states')
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StatePromote.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/src/ch/asynk/tankontank/game/states/StatePromote.java b/core/src/ch/asynk/tankontank/game/states/StatePromote.java
index c6302f4..8cf557a 100644
--- a/core/src/ch/asynk/tankontank/game/states/StatePromote.java
+++ b/core/src/ch/asynk/tankontank/game/states/StatePromote.java
@@ -7,13 +7,10 @@ public class StatePromote extends StateCommon
@Override
public void enter(StateType prevState)
{
- ctrl.hud.actionButtons.hide();
- String str = selectedUnit.toString();
- if (ctrl.player.promote(selectedUnit)) {
- map.activatedUnits.add(selectedUnit);
- // ctrl.hud.notify(str+ " has been promoted");
- }
- ctrl.setState(StateType.DONE);
+ map.promoteUnit(ctrl.player, selectedUnit, ctrl.battle.getHudPosition(ctrl.player));
+ ctrl.setAnimationCount(1);
+ ctrl.setAfterAnimationState(StateType.SELECT);
+ ctrl.setState(StateType.ANIMATION);
}
@Override