summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-27 14:35:19 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-27 14:35:19 +0100
commitdaeebba49e1744603776ea1a732f17b606df3898 (patch)
tree28d850fe6d5d9c8981339946a5b35bd3b7f7d8bf /core/src/ch/asynk/tankontank
parenta92265e0d0d9104b40dd2cda926c6762107b3481 (diff)
downloadRustAndDust-daeebba49e1744603776ea1a732f17b606df3898.zip
RustAndDust-daeebba49e1744603776ea1a732f17b606df3898.tar.gz
fix run
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/game/Ctrl.java5
-rw-r--r--core/src/ch/asynk/tankontank/game/states/StateAnimation.java2
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java16
3 files changed, 8 insertions, 15 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java
index cf08d3f..7149d56 100644
--- a/core/src/ch/asynk/tankontank/game/Ctrl.java
+++ b/core/src/ch/asynk/tankontank/game/Ctrl.java
@@ -99,11 +99,6 @@ public class Ctrl implements Disposable
return (state != selectState);
}
- public boolean mayProcessTouch()
- {
- return (state != animationState);
- }
-
public void setAnimationCount(int count)
{
animationCount = count;
diff --git a/core/src/ch/asynk/tankontank/game/states/StateAnimation.java b/core/src/ch/asynk/tankontank/game/states/StateAnimation.java
index 86bf61c..6738beb 100644
--- a/core/src/ch/asynk/tankontank/game/states/StateAnimation.java
+++ b/core/src/ch/asynk/tankontank/game/states/StateAnimation.java
@@ -5,12 +5,14 @@ public class StateAnimation extends StateCommon
@Override
public void enter(StateType prevState)
{
+ ctrl.blockMap = true;
ctrl.hud.actionButtons.hide();
}
@Override
public void leave(StateType nextState)
{
+ ctrl.blockMap = false;
}
@Override
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java
index efade05..13bb805 100644
--- a/core/src/ch/asynk/tankontank/screens/GameScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java
@@ -124,11 +124,9 @@ public class GameScreen implements Screen
// blocked = false;
if (button == Input.Buttons.LEFT) {
dragPos.set(x, y);
- if (ctrl.mayProcessTouch()) {
- unprojectToHud(x, y, hudTouch);
- unprojectToMap(x, y, mapTouch);
- ctrl.touchDown(hudTouch.x, hudTouch.y, mapTouch.x, mapTouch.y);
- }
+ unprojectToHud(x, y, hudTouch);
+ unprojectToMap(x, y, mapTouch);
+ ctrl.touchDown(hudTouch.x, hudTouch.y, mapTouch.x, mapTouch.y);
}
return true;
}
@@ -137,11 +135,9 @@ public class GameScreen implements Screen
{
// if (blocked) return true;
if (button == Input.Buttons.LEFT) {
- if (ctrl.mayProcessTouch()) {
- unprojectToHud(x, y, hudTouch);
- unprojectToMap(x, y, mapTouch);
- ctrl.touchUp(hudTouch.x, hudTouch.y, mapTouch.x, mapTouch.y);
- }
+ unprojectToHud(x, y, hudTouch);
+ unprojectToMap(x, y, mapTouch);
+ ctrl.touchUp(hudTouch.x, hudTouch.y, mapTouch.x, mapTouch.y);
}
// blocked = true;
// inputDelay = INPUT_DELAY;