summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-12-04 15:31:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-12-04 15:31:20 +0100
commitdc29b2e00bbd6461ce643f5f985c0d51c7191577 (patch)
tree976aa9cc96b7c6421d345c7f6b2d1e04db250fb5 /core/src/ch/asynk/tankontank/game
parent5478be45d1edb033159846fda6488c819aa77b82 (diff)
downloadRustAndDust-dc29b2e00bbd6461ce643f5f985c0d51c7191577.zip
RustAndDust-dc29b2e00bbd6461ce643f5f985c0d51c7191577.tar.gz
TankFireAnimation,InfantryFireAnimation: offset -> halfWidth
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index f1d8420..5db9915 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -411,10 +411,11 @@ public abstract class Map extends Board
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, (u.getWidth() / 2.f), from.getX(), from.getY(), to.getX(), to.getY()));
+ seq.addAnimation(InfantryFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
else
- seq.addAnimation(TankFireAnimation.get(ctrl.cfg.fxVolume, (u.getWidth() / 2.f), from.getX(), from.getY(), to.getX(), to.getY()));
+ seq.addAnimation(TankFireAnimation.get(ctrl.cfg.fxVolume, from.getX(), from.getY(), to.getX(), to.getY(), halfWidth));
seq.addAnimation(notifyDoneAnimation(target));
addAnimation(seq);
}