From 6edb6023b2bf9ce6087a2a55281b93e9c515aa7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 5 Nov 2014 16:38:18 +0100 Subject: Board: simply getSetPawnOntoAnimation(...) thanks to Pawn.Move --- core/src/ch/asynk/tankontank/engine/Board.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index 7a4ce40..9300d73 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -424,12 +424,12 @@ public abstract class Board implements Disposable return pawn; } - private RunnableAnimation getSetPawnOntoAnimation(final Pawn pawn, final Tile dest ) + private RunnableAnimation getSetPawnOntoAnimation(final Pawn pawn) { return RunnableAnimation.get(pawn, new Runnable() { @Override public void run() { - setPawnOnto(pawn, dest, pawn.getRotation()); + setPawnOnto(pawn, pawn.move.to, pawn.move.orientation); } }); } @@ -440,7 +440,7 @@ public abstract class Board implements Disposable removePawn(pawn); AnimationSequence seq = pawn.getMoveAnimation(possiblePaths.iterator(), possiblePaths.pathSteps(0) + 2); - seq.addAnimation(getSetPawnOntoAnimation(pawn, possiblePaths.to)); + seq.addAnimation(getSetPawnOntoAnimation(pawn)); seq.addAnimation(whenDone); addAnimation(seq); @@ -453,7 +453,7 @@ public abstract class Board implements Disposable removePawn(pawn); AnimationSequence seq = pawn.getRotateAnimation(o.r(), 2); - seq.addAnimation(getSetPawnOntoAnimation(pawn, pawn.getTile())); + seq.addAnimation(getSetPawnOntoAnimation(pawn)); seq.addAnimation(whenDone); addAnimation(seq); -- cgit v1.1-2-g2b99