summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-31 14:52:47 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-31 14:52:47 +0100
commit032a15831adc3ee834ce5bfb13282f06e363c379 (patch)
tree112ae8da511d7a21884491a3f1c0975722a7da79 /core/src/ch
parent9996d4a7592a658d17f53bdf9b31b954a9a0728e (diff)
downloadRustAndDust-032a15831adc3ee834ce5bfb13282f06e363c379.zip
RustAndDust-032a15831adc3ee834ce5bfb13282f06e363c379.tar.gz
Board: movePawn: use possiblePaths.to in RunnableAnimation
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 9a9cbb2..6379bed 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -358,13 +358,12 @@ public abstract class Board implements Disposable
{
removePawn(pawn);
+ final Tile destination = possiblePaths.to;
AnimationSequence seq = pawn.getMoveAnimation(possiblePaths.iterator(), possiblePaths.pathSteps(0) + 2);
seq.addAnimation(RunnableAnimation.get(pawn, new Runnable() {
@Override
public void run() {
- // FIXME pawn.getTile() is not ok
- Vector2 center = pawn.getCenter();
- setPawnOnto(pawn, getTileAt(center.x, center.y), pawn.getRotation());
+ setPawnOnto(pawn, destination, pawn.getRotation());
}
}));
seq.addAnimation(whenDone);