summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java10
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java5
3 files changed, 12 insertions, 4 deletions
diff --git a/TODO b/TODO
index 39baa63..c6a9cf4 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
BUGS:
- unitDock click issues
- - possible to select units before the end of engagement animation
TODO:
- GameModeMenu
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;