From bf58e77fbf5536d8fe730acec496f536ac72f647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 5 Nov 2014 17:21:08 +0100 Subject: Hud: show/hide/block reinforcement --- core/src/ch/asynk/tankontank/game/Hud.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 329505c..6482077 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -108,10 +108,18 @@ public class Hud implements Disposable public void changeState(StateType from, StateType to) { + if (to != StateType.ENTRY); + unitDock.hide(); + + if ((to == StateType.SELECT) || (to == StateType.ENTRY)) + reinforcement.blocked = false; + else + reinforcement.blocked = true; } public void update() { + unitDock.hide(); turns.write("" + ctrl.player.getTurn()); aps.write("" + ctrl.player.getAp()); int r = ctrl.player.getReinforcement().size(); -- cgit v1.1-2-g2b99