diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-03 12:34:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-03 12:34:50 +0100 |
commit | d73d51626589a3e50916949ce6e6b020708e1680 (patch) | |
tree | ea4abada8a4fff6904085946eb9f07c9572831eb /core | |
parent | 3d23ef5a35b948359576b5d64e8d6f929bf342be (diff) | |
download | RustAndDust-d73d51626589a3e50916949ce6e6b020708e1680.zip RustAndDust-d73d51626589a3e50916949ce6e6b020708e1680.tar.gz |
Pawn: do not use image.getXxxx()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index bc498e2..23cbfa4 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -141,15 +141,15 @@ public abstract class Pawn implements Moveable, Disposable public Vector2 getCenter() { - float x = (image.getX() + (image.getWidth() / 2f)); - float y = (image.getY() + (image.getHeight() / 2f)); + float x = (getX() + (getWidth() / 2f)); + float y = (getY() + (getHeight() / 2f)); return new Vector2(x, y); } public Vector2 getPosAt(Tile tile, Vector2 pos) { - float x = (tile.getX() - (image.getWidth() / 2f)); - float y = (tile.getY() - (image.getHeight() / 2f)); + float x = (tile.getX() - (getWidth() / 2f)); + float y = (tile.getY() - (getHeight() / 2f)); if (pos == null) return new Vector2(x, y); else @@ -161,8 +161,8 @@ public abstract class Pawn implements Moveable, Disposable { this.prevTile = this.tile; this.tile = tile; - float x = (tile.getX() - (image.getWidth() / 2f)); - float y = (tile.getY() - (image.getHeight() / 2f)); + float x = (tile.getX() - (getWidth() / 2f)); + float y = (tile.getY() - (getHeight() / 2f)); setPosition(x, y, z); } |