summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index 61e98c8..695f256 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -450,6 +450,23 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
ctrl.animationDone();
}
+ private void addEngagementAnimation(Unit target)
+ {
+ FireAnimation.reset();
+ Hex to = target.getHex();
+ for (Unit u : activatedUnits) {
+ Hex from = u.getHex();
+ AnimationSequence seq = AnimationSequence.get(2);
+ float halfWidth = (u.getWidth() / 2f);
+ if (u.isA(Unit.UnitType.INFANTRY))
+ seq.addAnimation(InfantryFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
+ else
+ seq.addAnimation(TankFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
+ seq.addAnimation(notifyDoneAnimation(target));
+ addAnimation(seq);
+ }
+ }
+
private boolean resolveFight(Unit unit, final Unit target, boolean mayReroll)
{
int d1 = d6();
@@ -523,23 +540,6 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS
return success;
}
- private void addEngagementAnimation(Unit target)
- {
- FireAnimation.reset();
- Hex to = target.getHex();
- for (Unit u : activatedUnits) {
- Hex from = u.getHex();
- AnimationSequence seq = AnimationSequence.get(2);
- float halfWidth = (u.getWidth() / 2f);
- if (u.isA(Unit.UnitType.INFANTRY))
- seq.addAnimation(InfantryFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
- else
- seq.addAnimation(TankFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
- seq.addAnimation(notifyDoneAnimation(target));
- addAnimation(seq);
- }
- }
-
public boolean engageUnit(Unit unit, final Unit target)
{
boolean mayReroll = false;