diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:21:08 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-05 17:21:08 +0100 |
commit | bf58e77fbf5536d8fe730acec496f536ac72f647 (patch) | |
tree | 857d30f9be8f595a667db3edfcef4bdc3af2a17d | |
parent | ce6ad7da0c330dd839a68dd9b42fcf0a04b0f09e (diff) | |
download | RustAndDust-bf58e77fbf5536d8fe730acec496f536ac72f647.zip RustAndDust-bf58e77fbf5536d8fe730acec496f536ac72f647.tar.gz |
Hud: show/hide/block reinforcement
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |