diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 16:38:18 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 16:38:18 +0100 |
commit | 6edb6023b2bf9ce6087a2a55281b93e9c515aa7e (patch) | |
tree | 4623fa91749b10e640566a4af5250151eda9e398 /core/src | |
parent | b7a165903bfa2a04d5abbf6fdb6e215252997655 (diff) | |
download | RustAndDust-6edb6023b2bf9ce6087a2a55281b93e9c515aa7e.zip RustAndDust-6edb6023b2bf9ce6087a2a55281b93e9c515aa7e.tar.gz |
Board: simply getSetPawnOntoAnimation(...) thanks to Pawn.Move
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 8 |
1 files 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); |