diff options
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 07f6a2c..c9941f2 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -34,6 +34,7 @@ public class Ctrl implements Disposable private int animationCount = 0; private State state; + private State.StateType stateType; public Ctrl(final TankOnTank game, final Battle battle) { @@ -56,11 +57,12 @@ public class Ctrl implements Disposable this.animationState = new StateAnimation(); this.state = selectState; + this.stateType = State.StateType.SELECT; this.hud = new Hud(this, game); player.turnStart(); - this.hud.update(); + hud.update(); } @Override @@ -132,6 +134,7 @@ public class Ctrl implements Disposable public void setState(State.StateType state, boolean normal) { + hud.changeState(stateType, state); this.state.leave(state); System.err.println(" switch to : " + state + " " + normal); @@ -161,6 +164,7 @@ public class Ctrl implements Disposable default: break; } + stateType = state; this.state.enter(normal); } diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 5282efb..32c8d03 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -124,6 +124,10 @@ public class Hud implements Disposable reinforcement.dispose(); } + public void changeState(StateType from, StateType to) + { + } + public void animate(float delta) { msg.animate(delta); |