From c3c85d9dc88b26b20dae3d1fc37bee2c4e06721e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 9 Dec 2015 22:38:17 +0100 Subject: Ctrl: code reorder --- core/src/ch/asynk/rustanddust/game/Ctrl.java | 44 ++++++++++++++++------------ 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java index 583381b..383417b 100644 --- a/core/src/ch/asynk/rustanddust/game/Ctrl.java +++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java @@ -119,6 +119,31 @@ public class Ctrl implements Disposable state.touchUp(); } + // Map callbacks + + public void animationsOver() + { + if (hud.dialogActive()) + hud.notifyAnimationsEnd(); + if (stateType == StateType.ANIMATION) { + StateType tmp = stateAfterAnimation; + stateAfterAnimation = StateType.DONE; + setState(tmp); + } + } + + // State callbacks + + public boolean checkDeploymentDone() + { + boolean done = battle.isDeploymentDone(); + if (done) + hud.askEndDeployment(); + return done; + } + + // Hud callbacks + public void showEntryZone() { if (stateType == StateType.DEPLOYMENT) { @@ -140,17 +165,6 @@ public class Ctrl implements Disposable } } - public void animationsOver() - { - if (hud.dialogActive()) - hud.notifyAnimationsEnd(); - if (stateType == StateType.ANIMATION) { - StateType tmp = stateAfterAnimation; - stateAfterAnimation = StateType.DONE; - setState(tmp); - } - } - private StateType actionAborted() { hud.notify("Action canceled"); @@ -255,14 +269,6 @@ public class Ctrl implements Disposable stateAfterAnimation = after; } - public boolean checkDeploymentDone() - { - boolean done = battle.isDeploymentDone(); - if (done) - hud.askEndDeployment(); - return done; - } - public void reinforcementHit() { if (this.stateType == StateType.SELECT) -- cgit v1.1-2-g2b99