summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Ctrl.java14
-rw-r--r--core/src/ch/asynk/rustanddust/game/Hud.java4
2 files changed, 5 insertions, 13 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Ctrl.java b/core/src/ch/asynk/rustanddust/game/Ctrl.java
index 4179ccd..0d414bc 100644
--- a/core/src/ch/asynk/rustanddust/game/Ctrl.java
+++ b/core/src/ch/asynk/rustanddust/game/Ctrl.java
@@ -221,7 +221,9 @@ public class Ctrl implements Disposable
public void touchDown()
{
- if (!blockHud && hud.touchDown(hudTouch.x, hudTouch.y))
+ boolean inAnimation = (this.stateType == StateType.ANIMATION);
+
+ if (!blockHud && hud.touchDown(hudTouch.x, hudTouch.y, inAnimation))
return;
if (!blockMap && state.downInMap(mapTouch.x, mapTouch.y))
@@ -244,16 +246,6 @@ public class Ctrl implements Disposable
state.touchUp();
}
- public boolean isInAction()
- {
- return (state != selectState);
- }
-
- public boolean isInAnimation()
- {
- return (this.stateType == StateType.ANIMATION);
- }
-
public void setAfterAnimationState(StateType after)
{
stateAfterAnimation = after;
diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java
index 68b2eb5..033baaf 100644
--- a/core/src/ch/asynk/rustanddust/game/Hud.java
+++ b/core/src/ch/asynk/rustanddust/game/Hud.java
@@ -155,7 +155,7 @@ public class Hud implements Disposable, Animation
return playerInfo.drag(x, y, dx, dy);
}
- public boolean touchDown(float x, float y)
+ public boolean touchDown(float x, float y, boolean isInAnimation)
{
hit = null;
@@ -168,7 +168,7 @@ public class Hud implements Disposable, Animation
return false;
}
- if (ctrl.isInAnimation())
+ if (isInAnimation)
return false;
if (hit == null) {