summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java6
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java12
2 files changed, 9 insertions, 9 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index b1eb382..8fbc548 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -457,7 +457,7 @@ public abstract class Board implements Disposable
getCoordinatePath(pawn, 0, finalPath, o);
removePawn(pawn);
- AnimationSequence seq = pawn.getMoveAnimation(finalPath);
+ AnimationSequence seq = pawn.getMoveAnimation(finalPath, 2);
seq.addAnimation(RunnableAnimation.get(pawn, new Runnable() {
@Override
public void run() {
@@ -476,7 +476,7 @@ public abstract class Board implements Disposable
Vector3 p = pawn.getPosition();
Vector3 v = vector3Pool.obtain();
v.set(p.x, p.y, o.r());
- AnimationSequence seq = pawn.getRotateAnimation(v);
+ AnimationSequence seq = pawn.getRotateAnimation(v, 1);
seq.addAnimation(whenDone);
addAnimation(seq);
vector3Pool.free(v);
@@ -487,7 +487,7 @@ public abstract class Board implements Disposable
{
removePawn(pawn);
- AnimationSequence seq = pawn.getRevertLastMoveAnimation();
+ AnimationSequence seq = pawn.getRevertLastMoveAnimation(2);
seq.addAnimation(RunnableAnimation.get(pawn, new Runnable() {
@Override
public void run() {
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 4439b31..42a4083 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -238,28 +238,28 @@ public abstract class Pawn implements Moveable, Disposable
return hasOverlayEnabled();
}
- public AnimationSequence getRotateAnimation(Vector3 v)
+ public AnimationSequence getRotateAnimation(Vector3 v, int size)
{
prevPosition.set(position);
- AnimationSequence seq = AnimationSequence.get(2);
+ AnimationSequence seq = AnimationSequence.get(1 + size);
seq.addAnimation(MoveToAnimation.get(this, v, MOVE_TIME));
return seq;
}
- public AnimationSequence getMoveAnimation(ArrayList<Vector3> path)
+ public AnimationSequence getMoveAnimation(ArrayList<Vector3> path, int size)
{
prevPosition.set(position);
- AnimationSequence seq = AnimationSequence.get(path.size() + 2);
+ AnimationSequence seq = AnimationSequence.get(path.size() + size);
for (Vector3 v : path)
seq.addAnimation(MoveToAnimation.get(this, v, MOVE_TIME));
return seq;
}
- public AnimationSequence getRevertLastMoveAnimation()
+ public AnimationSequence getRevertLastMoveAnimation(int size)
{
- AnimationSequence seq = AnimationSequence.get(4);
+ AnimationSequence seq = AnimationSequence.get(2 + size);
seq.addAnimation(MoveToAnimation.get(this, prevPosition, MOVE_TIME));
seq.addAnimation(RunnableAnimation.get(this, new Runnable() {
@Override