summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-05 17:21:08 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-05 17:21:08 +0100
commitbf58e77fbf5536d8fe730acec496f536ac72f647 (patch)
tree857d30f9be8f595a667db3edfcef4bdc3af2a17d /core
parentce6ad7da0c330dd839a68dd9b42fcf0a04b0f09e (diff)
downloadRustAndDust-bf58e77fbf5536d8fe730acec496f536ac72f647.zip
RustAndDust-bf58e77fbf5536d8fe730acec496f536ac72f647.tar.gz
Hud: show/hide/block reinforcement
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java8
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();