summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java5
2 files changed, 12 insertions, 3 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 24f496c..3609fee 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -120,6 +120,11 @@ public class Ctrl implements Disposable
return;
if (hud.dialogActive())
return;
+ leaveAnimationState();
+ }
+
+ private void leaveAnimationState()
+ {
StateType tmp = stateAfterAnimation;
stateAfterAnimation = StateType.DONE;
@@ -306,6 +311,11 @@ public class Ctrl implements Disposable
}
// Hud callbacks
+ public void engagementPanelClosed()
+ {
+ if (animationCount == 0)
+ leaveAnimationState();
+ }
public void endDeployment()
{
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 63996fe..b1d2dd6 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -202,9 +202,8 @@ public class Hud implements Disposable, Animation
closeOkCancel();
else if (dialog == stats)
ctrl.endGame();
- else if (dialog == engagement) {
- ctrl.animationDone();
- }
+ else if (dialog == engagement)
+ ctrl.engagementPanelClosed();
if (dialogs.size() > 0)
dialogs.getFirst().visible = true;