diff options
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 10 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/states/StatePromote.java | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 2866e4c..fb7c50a 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -295,19 +295,13 @@ public abstract class Map extends Board activatedUnits.add(unit); } - public void promoteUnit(final Player player, final Unit unit, Position position) + public void promoteUnit(final Player player, final Unit unit) { activatedUnits.add(unit); - // FIXME - float x = 60f; - float y = 60f; - if (position == Position.TOP_RIGHT) - x = getWidth() - 60f; - Hex hex = unit.getHex(); AnimationSequence seq = AnimationSequence.get(2); - seq.addAnimation(PromoteAnimation.get((unit.getArmy() == Army.US), x, y, hex.getX(), hex.getY(), ctrl.cfg.fxVolume)); + seq.addAnimation(PromoteAnimation.get((unit.getArmy() == Army.US), ctrl.mapTouch.x, ctrl.mapTouch.y, hex.getX(), hex.getY(), ctrl.cfg.fxVolume)); seq.addAnimation ( RunnableAnimation.get(unit, new Runnable() { @Override public void run() { diff --git a/core/src/ch/asynk/tankontank/game/states/StatePromote.java b/core/src/ch/asynk/tankontank/game/states/StatePromote.java index 8cf557a..caf781b 100644 --- a/core/src/ch/asynk/tankontank/game/states/StatePromote.java +++ b/core/src/ch/asynk/tankontank/game/states/StatePromote.java @@ -7,7 +7,7 @@ public class StatePromote extends StateCommon @Override public void enter(StateType prevState) { - map.promoteUnit(ctrl.player, selectedUnit, ctrl.battle.getHudPosition(ctrl.player)); + map.promoteUnit(ctrl.player, selectedUnit); ctrl.setAnimationCount(1); ctrl.setAfterAnimationState(StateType.SELECT); ctrl.setState(StateType.ANIMATION); |