summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-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;