diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-10 14:24:27 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-10 14:24:27 +0200 |
commit | 40c05597ad1b464fc4195b5403db609dca60269d (patch) | |
tree | 6d230fd56cd9410182bcb37ed5072ac404f5dafe /core/src/ch | |
parent | 06215b1e54616084d661c4e1265b40b68fc9e6e7 (diff) | |
download | RustAndDust-40c05597ad1b464fc4195b5403db609dca60269d.zip RustAndDust-40c05597ad1b464fc4195b5403db609dca60269d.tar.gz |
Ctrl: factorise code
Diffstat (limited to 'core/src/ch')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 39811d3..4059b13 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -433,18 +433,11 @@ public abstract class Ctrl implements Disposable map.prepareReplayLastTurn(); setState(StateType.REPLAY); this.stateAfterAnimation = StateType.REPLAY; - } else { - hud.notify("Replay Done", Position.MIDDLE_CENTER); - map.clearMarshalUnits(); - if (!synched) { - storeGameState(); - synched = true; - } - this.mode = Mode.PLAY; - checkPlayer(battle.getState()); + blockEvents = 0.5f; + return; } - blockEvents = 0.5f; - return; + nextState = null; + map.clearMarshalUnits(); } hud.notify("Replay Done", Position.MIDDLE_CENTER); this.mode = Mode.PLAY; |