diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-04 16:17:25 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-04 16:17:25 +0100 |
commit | b149e757362d29c01563a914c4e43d62128a3684 (patch) | |
tree | 331c5c7c45eee5ed46b1b79796fa6d417908f7c1 /core/src/ch/asynk | |
parent | 4703a17cac8f2f0f74542c4fc0b371d24d052b4d (diff) | |
download | RustAndDust-b149e757362d29c01563a914c4e43d62128a3684.zip RustAndDust-b149e757362d29c01563a914c4e43d62128a3684.tar.gz |
UnitDock: do not hit when not visible
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/UnitDock.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java index c90ae81..49189f2 100644 --- a/core/src/ch/asynk/tankontank/game/hud/UnitDock.java +++ b/core/src/ch/asynk/tankontank/game/hud/UnitDock.java @@ -73,7 +73,7 @@ public class UnitDock extends Bg @Override public boolean hit(float x, float y) { - if (scaledRect.contains(x, y)) { + if (visible && scaledRect.contains(x, y)) { int i = (int) ((scaledRect.y + scaledRect.height - y) / (scaledRect.height / pawns.size())); selectedPawn = pawns.get(i); return true; |