summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-16 01:17:21 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-16 01:17:21 +0100
commitc5ec3669fb3d7cada8b6cec513e1f2a3ab5c5f22 (patch)
treea471b16dbc3fd226e404165af1b25d4cae702466 /core/src
parent041f0319f7661e5ad81b8362ee56c11cd0359076 (diff)
downloadRustAndDust-c5ec3669fb3d7cada8b6cec513e1f2a3ab5c5f22.zip
RustAndDust-c5ec3669fb3d7cada8b6cec513e1f2a3ab5c5f22.tar.gz
UnitDock: do not show if dock empty
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/UnitDock.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
index 4e78c32..0e67630 100644
--- a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
+++ b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java
@@ -97,6 +97,8 @@ public class UnitDock extends Bg
float x = position.getX(rect.width * SCALE);
if (done) {
pawns = ctrl.player.getReinforcement();
+ if(pawns.size() == 0)
+ return;
rect.width = pawns.get(0).getWidth() + (2 * padding);
rect.height = ((pawns.get(0).getHeight() * pawns.size()) + ((pawns.size() + 1) * padding));
rect.x = (position.isLeft() ? (0 - (rect.width * SCALE)) : (x + (rect.width * SCALE)));