diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-29 02:11:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-29 02:11:21 +0100 |
commit | eae09d2d420e226795b08085afe2cc3c28cd6120 (patch) | |
tree | 31372ca093f56327785698be4edcacc513a66f9c /core/src/ch/asynk/tankontank/game/states | |
parent | 0af95b0519a78e4959c3645b55b2de7a19d27f59 (diff) | |
download | RustAndDust-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.java | 11 |
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 |