diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 21:52:16 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-12-09 21:52:16 +0100 |
commit | b23dc623abcee4ca5d74c3ffb00a37183ff7e9ae (patch) | |
tree | 02ac12f22f46e2c9aba772d56204e7622c055d03 /core/src/ch/asynk/rustanddust | |
parent | 0eb5c308137c6a64a09d4d67f26c8454c3a682be (diff) | |
download | RustAndDust-b23dc623abcee4ca5d74c3ffb00a37183ff7e9ae.zip RustAndDust-b23dc623abcee4ca5d74c3ffb00a37183ff7e9ae.tar.gz |
Ctrl: reduce exchanges between Hud and Ctrl during engagement
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Ctrl.java | 19 | ||||
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/Hud.java | 2 |
2 files changed, 5 insertions, 16 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 5edadaf..4179ccd 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -106,15 +106,11 @@ public class Ctrl implements Disposable { if (hud.dialogActive()) hud.notifyAnimationsEnd(); - else if (stateType == StateType.ANIMATION) - leaveAnimationState(); - } - - private void leaveAnimationState() - { - StateType tmp = stateAfterAnimation; - stateAfterAnimation = StateType.DONE; - setState(tmp); + if (stateType == StateType.ANIMATION) { + StateType tmp = stateAfterAnimation; + stateAfterAnimation = StateType.DONE; + setState(tmp); + } } private StateType actionAborted() @@ -280,11 +276,6 @@ public class Ctrl implements Disposable } // Hud callbacks - public void engagementPanelClosed() - { - if (animationCount == 0) - leaveAnimationState(); - } public void endDeployment() { diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java index b1750f8..68b2eb5 100644 --- a/core/src/ch/asynk/rustanddust/game/Hud.java +++ b/core/src/ch/asynk/rustanddust/game/Hud.java @@ -216,8 +216,6 @@ public class Hud implements Disposable, Animation closeOkCancel(); else if (dialog == stats) ctrl.endGame(); - else if (dialog == engagement) - ctrl.engagementPanelClosed(); if (dialogs.size() > 0) dialogs.getFirst().visible = true; |