summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-21 15:41:41 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-21 15:41:41 +0100
commita52bcc814acef086b6a3bb00d1183e5a185af9ce (patch)
treefafcc48988f628b988a81ea7c10e654114e76e3f /core/src/ch/asynk/tankontank/engine
parent03cb6cd1d5b84ae6650fd4749705361d35914688 (diff)
downloadRustAndDust-a52bcc814acef086b6a3bb00d1183e5a185af9ce.zip
RustAndDust-a52bcc814acef086b6a3bb00d1183e5a185af9ce.tar.gz
Pawn: Vector2 getCenter() -> float getCenterX() and float getCenterY()
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)