summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-12-09 22:38:17 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-12-09 22:38:17 +0100
commitc3c85d9dc88b26b20dae3d1fc37bee2c4e06721e (patch)
tree8eb7e59404c2feaa4abdf411228a2c94efcd32a9 /core/src/ch
parente0ede08f2bf653882318ffcaccc61bb7d76952ad (diff)
downloadRustAndDust-c3c85d9dc88b26b20dae3d1fc37bee2c4e06721e.zip
RustAndDust-c3c85d9dc88b26b20dae3d1fc37bee2c4e06721e.tar.gz
Ctrl: code reorder
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java44
1 files 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)