diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 3 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index dddb746..ee0c76e 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -437,7 +437,7 @@ public abstract class Board implements Disposable pushPawnAt(pawn, coords); } - public void movePawn(final Pawn pawn, ArrayList<Vector3> path) + public void movePawn(final Pawn pawn, ArrayList<Vector3> path, RunnableAnimation whenDone) { removePawnFrom(pawn, getHexAt(pawn.getCenter())); @@ -448,6 +448,7 @@ public abstract class Board implements Disposable pushPawnAt(pawn, getHexAt(pawn.getCenter())); } })); + seq.addAnimation(whenDone); addPawnAnimation(pawn, seq); } diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 51ac492..f68c473 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -144,7 +144,7 @@ public abstract class Pawn implements Drawable, Disposable int s = path.size(); final Vector3 finalPos = path.get(s - 1); - AnimationSequence seq = AnimationSequence.get(s + 1); + AnimationSequence seq = AnimationSequence.get(s + 3); for (Vector3 v : path) { seq.addAnimation(MoveToAnimation.get(this, v, MOVE_TIME)); |