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/Pawn.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index ba4a2bd..531b337 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -224,11 +224,14 @@ public abstract class Pawn implements Moveable, Disposable
setPosition(position.x, position.y, position.z);
}
- public Vector2 getCenter()
+ public float getCenterX()
{
- float x = (getX() + (getWidth() / 2f));
- float y = (getY() + (getHeight() / 2f));
- return new Vector2(x, y);
+ return (getX() + (getWidth() / 2f));
+ }
+
+ public float getCenterY()
+ {
+ return (getY() + (getHeight() / 2f));
}
public Vector2 getPosAt(Tile tile, Vector2 pos)