summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-06 19:38:41 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-06 19:38:41 +0200
commitd8797c65eb7ebd7ab432ff4726186c8b80777680 (patch)
tree41032bb0402d55199ac284cea01b613f55f63e05 /core/src/ch/asynk/tankontank/game
parent7db893e40c861d9d167d1e0a5602c1b19fdf9b88 (diff)
downloadRustAndDust-d8797c65eb7ebd7ab432ff4726186c8b80777680.zip
RustAndDust-d8797c65eb7ebd7ab432ff4726186c8b80777680.tar.gz
GameCtrl: replace inAnimation() with mayProcessTouch()
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r--core/src/ch/asynk/tankontank/game/GameCtrl.java4
-rw-r--r--core/src/ch/asynk/tankontank/game/Hud.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/GameCtrl.java b/core/src/ch/asynk/tankontank/game/GameCtrl.java
index c22629e..d662f0a 100644
--- a/core/src/ch/asynk/tankontank/game/GameCtrl.java
+++ b/core/src/ch/asynk/tankontank/game/GameCtrl.java
@@ -53,9 +53,9 @@ public class GameCtrl implements Disposable
factory.dispose();
}
- public boolean inAnimation()
+ public boolean mayProcessTouch()
{
- return (state == animationState);
+ return (state != animationState);
}
public void animationDone()
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java
index 26b986f..e781305 100644
--- a/core/src/ch/asynk/tankontank/game/Hud.java
+++ b/core/src/ch/asynk/tankontank/game/Hud.java
@@ -147,7 +147,7 @@ public class Hud implements Disposable
public boolean touchDown(float x, float y)
{
- if (ctrl.inAnimation() || !rect.contains(x,y)) return false;
+ if (!rect.contains(x,y)) return false;
if (cancelAct.hit(x, y)) {
ctrl.abort();
@@ -159,7 +159,7 @@ public class Hud implements Disposable
public boolean touchUp(float x, float y)
{
- if (ctrl.inAnimation() || !rect.contains(x,y)) return false;
+ if (!rect.contains(x,y)) return false;
if (moveAct.hit(x, y)) {
moveAct.setOn();