diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 7 |
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"); } |