summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java17
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java12
2 files changed, 16 insertions, 13 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 98a5ca2..c42de49 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -134,6 +134,22 @@ public class Ctrl implements Disposable
nextPlayer();
}
+ public void stateTouchUp()
+ {
+ this.state.touchUp();
+ }
+
+ public void toggleState(State.StateType stateA, State.StateType stateB)
+ {
+ if (this.stateType == stateA) {
+ setState(stateB);
+ } else if (this.stateType == stateB) {
+ setState(stateA);
+ } else {
+ TankOnTank.debug("Ctrl", "wrong call to toggleState()");
+ }
+ }
+
public void setState(State.StateType state)
{
if (state == State.StateType.ABORT) {
@@ -148,7 +164,6 @@ public class Ctrl implements Disposable
public void setState(State.StateType state, boolean normal)
{
- hud.changeState(stateType, state);
this.state.leave(state);
TankOnTank.debug(" switch to : " + state + " " + normal);
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 5087abe..3afd2dc 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -68,18 +68,6 @@ public class Hud implements Disposable
stats.dispose();
}
- public void changeState(StateType from, StateType to)
- {
- // if (to != StateType.ENTRY);
- // playerInfo.hideUnitDock();
- // TODO when reselect another -> do not hide Dock
-
- if ((to == StateType.SELECT) || (to == StateType.ENTRY))
- playerInfo.blockReinforcement(false);
- else
- playerInfo.blockReinforcement(true);
- }
-
public void update()
{
Position position = ctrl.battle.getHudPosition(ctrl.player);