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 4834b45..0808f86 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -301,6 +301,11 @@ public abstract class Pawn implements Moveable, Disposable return Orientation.fromRotation(getRotation()); } + public void translate(float dx, float dy) + { + setPosition((getX() + dx), (getY() + dy)); + } + public void centerOn(float x, float y) { setPosition((x - (getWidth() / 2f)), (y - (getHeight() / 2f))); |