summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:33:18 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-14 16:33:18 +0100
commit324e17f72845c302533703170cadc0921732190f (patch)
tree5602cddde4c22abd6cf8b6884a02ba23168fbea3 /core/src/ch
parent2010c3ecebe7d6b4c5cd7d00be438f33fe72cd1e (diff)
downloadRustAndDust-324e17f72845c302533703170cadc0921732190f.zip
RustAndDust-324e17f72845c302533703170cadc0921732190f.tar.gz
Ctrl: when animations are over: default stateAfterAnimation to StateType.DONE
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index 8b0fa93..cba0e5b 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -102,8 +102,11 @@ public class Ctrl implements Disposable
public void animationDone()
{
animationCount -= 1;
- if (animationCount == 0)
- setState(stateAfterAnimation);
+ if (animationCount == 0) {
+ StateType tmp = stateAfterAnimation;
+ stateAfterAnimation = StateType.DONE;
+ setState(tmp);
+ }
if (animationCount < 0)
TankOnTank.debug(" animationCount < 0");
}