diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index bcb8a07..31c4964 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -13,6 +13,7 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import ch.asynk.tankontank.engine.Pawn; import ch.asynk.tankontank.engine.Board; import ch.asynk.tankontank.engine.Orientation; +import ch.asynk.tankontank.engine.gfx.animations.RunnableAnimation; public abstract class Map extends Board { @@ -120,10 +121,25 @@ public abstract class Map extends Board { int s = getCoordinatePath(pawn, finalPath, o); if (s > 0) { - movePawn(pawn, finalPath); + movePawn(pawn, finalPath, RunnableAnimation.get(pawn, new Runnable() { + @Override + public void run() { + ctrl.animationDone(); + } + })); } } + public void rotatePawn(Pawn pawn, Orientation o) + { + rotatePawn(pawn, o, RunnableAnimation.get(pawn, new Runnable() { + @Override + public void run() { + ctrl.animationDone(); + } + })); + } + public void hidePossibles() { enablePossibleTargets(false); |