diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-27 14:45:42 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-27 14:45:42 +0100 |
commit | 6453da8b559f7a88aeed867e02e6e5f9718ab45b (patch) | |
tree | 46c160d119cac41c9352c498080a7b4bae77cd04 /core/src/ch/asynk/tankontank/game | |
parent | daeebba49e1744603776ea1a732f17b606df3898 (diff) | |
download | RustAndDust-6453da8b559f7a88aeed867e02e6e5f9718ab45b.zip RustAndDust-6453da8b559f7a88aeed867e02e6e5f9718ab45b.tar.gz |
Ctrl,Hud: only hit dialogs when in action
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-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; |