diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-04 14:06:04 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-04 14:06:04 +0200 |
commit | ac975b903ac17efee689bc28f363ff4141dbad90 (patch) | |
tree | 8852ebcd0bc309b9afd71b72efad4e6650c73a52 | |
parent | 70199c93d255357bb8af8fb60d501d9ae1ca8860 (diff) | |
download | RustAndDust-ac975b903ac17efee689bc28f363ff4141dbad90.zip RustAndDust-ac975b903ac17efee689bc28f363ff4141dbad90.tar.gz |
StateSelect: clear() on reinforcement dock togggle
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 4 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/states/StateSelect.java | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 02d79e5..db28b80 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -535,8 +535,10 @@ public abstract class Ctrl implements Disposable private void unitDockToggle() { - if (this.stateType == StateType.SELECT) + if (this.stateType == StateType.SELECT) { + sendMsg(MsgType.CANCEL); post(StateType.REINFORCEMENT); + } else if (this.stateType == StateType.REINFORCEMENT) { sendMsg(MsgType.OK); post(StateType.SELECT); diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java index f6c42c3..8118e89 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java @@ -28,6 +28,9 @@ public class StateSelect extends StateCommon case PROMOTE: changeTo(StateType.PROMOTE); return true; + case CANCEL: + clear(); + return true; } return false; |