diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-17 17:49:17 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-17 17:49:17 +0200 |
commit | 8818c998b046e9e4c27cdace43bbf15bb89a27f8 (patch) | |
tree | 6cb9f2c25744ee9100d8daa68dd62cf392f3cd9d /core/src/ch/asynk/rustanddust | |
parent | b3d997a6f50c2337e799954bcf31b643a8463da5 (diff) | |
download | RustAndDust-8818c998b046e9e4c27cdace43bbf15bb89a27f8.zip RustAndDust-8818c998b046e9e4c27cdace43bbf15bb89a27f8.tar.gz |
PlayerInfo: remove useless calls to setLabelPosition(...)
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java index 9f86b13..d822794 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java +++ b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java @@ -41,6 +41,7 @@ public class PlayerInfo implements Disposable, Drawable, Animation aps = new LabelImage(game.factory.getHudRegion(game.factory.HUD_APS), game.font, 5f); reinforcement = new LabelImage(game.factory.getHudRegion(game.factory.REINFORCEMENT), game.font, 5f); unitDock = new UnitDock(game, 10f); + turns.setPosition(Position.TOP_CENTER); } @Override @@ -61,8 +62,7 @@ public class PlayerInfo implements Disposable, Drawable, Animation aps.translate(dx, dy); reinforcement.translate(dx, dy); unitDock.translate(dx, dy); - turns.setPosition(Position.TOP_CENTER); - turns.setLabelPosition(Position.MIDDLE_CENTER); + turns.update(); } public void setPosition(Position position) @@ -93,11 +93,8 @@ public class PlayerInfo implements Disposable, Drawable, Animation x -= (aps.getWidth() + PADDING); aps.setPosition(x, y); } - turns.setPosition(Position.TOP_CENTER); - turns.setLabelPosition(Position.MIDDLE_CENTER); - aps.setLabelPosition(Position.MIDDLE_CENTER); - reinforcement.setLabelPosition(Position.MIDDLE_CENTER); unitDock.setPosition(position, reinforcement.getY() - PADDING); + turns.update(); } public void update(Player player, Position position) |