summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index b22c0ef..22da2ed 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -51,6 +51,13 @@ public abstract class Pawn implements Drawable, Disposable
return moves.getFirst();
}
+ public Vector2 getCenter()
+ {
+ float x = (image.getX() + (image.getWidth() / 2f));
+ float y = (image.getY() + (image.getHeight() / 2f));
+ return new Vector2(x, y);
+ }
+
public Vector2 getPosAt(Vector2 center, Vector2 pos)
{
float x = (center.x - (image.getWidth() / 2f));