diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-17 15:13:10 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-17 15:13:10 +0200 |
commit | 46d5fa56a41a07c2dee3c433a0cf14dc1cec207a (patch) | |
tree | c7b4d5048159660f2a9d900bd44d758f63ff9eb6 /core | |
parent | 4decd2fd1ed29700d41a3b4570f1156bf890a74d (diff) | |
download | RustAndDust-46d5fa56a41a07c2dee3c433a0cf14dc1cec207a.zip RustAndDust-46d5fa56a41a07c2dee3c433a0cf14dc1cec207a.tar.gz |
Playre: fix setTopLeft()
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Player.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 2b40229..ef95a22 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -55,8 +55,8 @@ public class Hud implements Disposable bg = new Bg(atlas.findRegion("disabled")); msg = new Msg(game.skin.getFont("default-font"), atlas.findRegion("disabled")); - ctrl.player().setTopLeft(Gdx.graphics.getHeight(), OFFSET); - ctrl.opponent().setTopLeft(Gdx.graphics.getHeight(), OFFSET); + ctrl.player().setTopLeft(OFFSET, (Gdx.graphics.getHeight() - OFFSET)); + ctrl.opponent().setTopLeft(OFFSET, (Gdx.graphics.getHeight() - OFFSET)); } @Override diff --git a/core/src/ch/asynk/tankontank/game/Player.java b/core/src/ch/asynk/tankontank/game/Player.java index b9bba70..d63a3f9 100644 --- a/core/src/ch/asynk/tankontank/game/Player.java +++ b/core/src/ch/asynk/tankontank/game/Player.java @@ -153,9 +153,9 @@ public class Player implements Drawable, Disposable return flag.contains(x, y); } - public void setTopLeft(float height, float offset) + public void setTopLeft(float x, float y) { - flag.setPosition(offset, (height - flag.getHeight() - offset)); + flag.setPosition(x, (y - flag.getHeight())); } public Iterator<Pawn> unitIterator() |