summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Positionable.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Positionable.java b/core/src/ch/asynk/gdx/boardgame/Positionable.java
index 53d92f8..36a9cda 100644
--- a/core/src/ch/asynk/gdx/boardgame/Positionable.java
+++ b/core/src/ch/asynk/gdx/boardgame/Positionable.java
@@ -8,6 +8,8 @@ public interface Positionable
public float getHeight();
public void translate(float dx, float dy);
public void setPosition(float x, float y);
+ default public float getCX() { return getX() + (getWidth() / 2f); }
+ default public float getCY() { return getY() + (getHeight() / 2f); }
default public void centerOn(float cx, float cy)
{