diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 23:47:20 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 23:47:20 +0100 |
commit | 46cbb5e2a1a246594fa35b72a53b1a1c76980278 (patch) | |
tree | 7d020583dd76289b0f33a15907e6e25071b915d5 /core/src/ch/asynk/rustanddust | |
parent | 12e32f31e5b450d5feb2bdf567317604f9a52edc (diff) | |
download | RustAndDust-46cbb5e2a1a246594fa35b72a53b1a1c76980278.zip RustAndDust-46cbb5e2a1a246594fa35b72a53b1a1c76980278.tar.gz |
Ctrl: no more AP -> only notify user
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 12 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/State.java | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 7dd29d5..9fcfe08 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -233,6 +233,8 @@ public class Ctrl implements Disposable this.state.enter(tmp); + if (nextState == StateType.TURN_OVER) + turnDone(); } private StateType completeDeployment() @@ -257,13 +259,15 @@ public class Ctrl implements Disposable StateType nextState = this.state.execute(); if (nextState == StateType.DONE) { - if (battle.actionDone()) { + if (battle.getPlayer().apExhausted()) { + hud.notify("No more Action Points", 1f, Position.MIDDLE_CENTER, false); + nextState = StateType.TURN_OVER; + } + else if (battle.actionDone()) { hud.notify("1 Action Point burnt", 0.6f, Position.BOTTOM_CENTER, false); hud.update(); + nextState = battle.getState(); } - if (battle.getPlayer().apExhausted()) - hud.notifyNoMoreAP(); - nextState = battle.getState(); } return nextState; diff --git a/core/src/ch/asynk/rustanddust/game/State.java b/core/src/ch/asynk/rustanddust/game/State.java index db0d6af..386df8b 100644 --- a/core/src/ch/asynk/rustanddust/game/State.java +++ b/core/src/ch/asynk/rustanddust/game/State.java @@ -14,7 +14,8 @@ public interface State DEPLOYMENT, WITHDRAW, ABORT, - DONE + DONE, + TURN_OVER }; public void enter(StateType prevState); |