diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index 049ff3e..b81f8c2 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -273,6 +273,11 @@ public abstract class Pawn implements Moveable, Disposable return Orientation.fromRotation(getRotation()); } + public void centerOn(float x, float y) + { + setPosition((x - (getWidth() / 2f)), (y - (getHeight() / 2f))); + } + @Override public void setPosition(float x, float y) { |