diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 5 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 7149d56..3390863 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -259,6 +259,11 @@ public class Ctrl implements Disposable state.touchUp(); } + public boolean isInAnimation() + { + return (this.stateType == StateType.ANIMATION); + } + public void stateTouchUp() { this.state.touchUp(); diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index 9e680cb..9220925 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -144,6 +144,10 @@ public class Hud implements Disposable return false; } } + + if (ctrl.isInAnimation()) + return false; + if (hit == null) { if (actionButtons.touchDown(x, y)) hit = actionButtons; |