summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-17 10:29:17 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-17 10:29:17 +0200
commit020b72ea69d57e308760fca0b2ec1d812807dc63 (patch)
tree40c42b151446dd89fc5b325e08b985b9f2368b8a /core/src/ch/asynk
parent736eb7cc1c06ef0d406279e56615d7c0f24cbd24 (diff)
downloadRustAndDust-020b72ea69d57e308760fca0b2ec1d812807dc63.zip
RustAndDust-020b72ea69d57e308760fca0b2ec1d812807dc63.tar.gz
Hud: add notify(String) use it from Ctrl and StateSelect
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateSelect.java1
3 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 77fab1f..e2aec6b 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -105,7 +105,7 @@ public class Ctrl implements Disposable
player().turnEnd();
player = ((player + 1) % 2);
player().turnStart();
- hud.nextTurn();
+ hud.notify(player().army + "'s turn");
}
private void checkTurnEnd()
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 35c0726..2b40229 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -90,6 +90,10 @@ public class Hud implements Disposable
msg.draw(batch);
}
+ public void notify(String s)
+ {
+ msg.write(s, 1);
+ }
private float setButton(Button btn, float x, float y)
{
diff --git a/core/src/ch/asynk/tankontank/game/states/StateSelect.java b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
index a06a6c0..7a9e3dd 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateSelect.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateSelect.java
@@ -72,6 +72,7 @@ public class StateSelect extends StateCommon
ctrl.hud.hide();
map.clearAll();
}
+ if (selectedPawn != null) ctrl.hud.notify(selectedPawn.toString());
}
@Override