summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index ee0c76e..5b5ecf8 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -452,6 +452,17 @@ public abstract class Board implements Disposable
addPawnAnimation(pawn, seq);
}
+ public void rotatePawn(final Pawn pawn, Orientation o, RunnableAnimation whenDone)
+ {
+ Vector3 p = pawn.getPosition();
+ Vector3 v = vector3Pool.obtain();
+ v.set(p.x, p.y, o.r());
+ AnimationSequence seq = pawn.getRotateAnimation(v);
+ seq.addAnimation(whenDone);
+ addPawnAnimation(pawn, seq);
+ vector3Pool.free(v);
+ }
+
private GridPoint2 getHexAt(Vector2 v)
{
if (v == null) return null;