diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-07 16:57:08 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-07 16:57:08 +0100 |
commit | 87b88167cf10cbb977f9f04fe204d65d89f1b781 (patch) | |
tree | 295604863db50aa701a377b3481e0031e83bb211 /core/src/ch/asynk/tankontank | |
parent | ef1f39fbcd65a8a972e11f232f8691cd207a0754 (diff) | |
download | RustAndDust-87b88167cf10cbb977f9f04fe204d65d89f1b781.zip RustAndDust-87b88167cf10cbb977f9f04fe204d65d89f1b781.tar.gz |
Ctrl: add public boolean blockMap
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Ctrl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Ctrl.java b/core/src/ch/asynk/tankontank/game/Ctrl.java index 25a4f79..9092471 100644 --- a/core/src/ch/asynk/tankontank/game/Ctrl.java +++ b/core/src/ch/asynk/tankontank/game/Ctrl.java @@ -23,6 +23,7 @@ public class Ctrl implements Disposable public Config cfg; public Player player; public Player opponent; + public boolean blockMap; private State selectState; private State pathState; @@ -63,6 +64,7 @@ public class Ctrl implements Disposable this.stateType = State.StateType.SELECT; this.hud = new Hud(this, game); + this.blockMap = false; player.turnStart(); hud.update(); @@ -187,13 +189,13 @@ public class Ctrl implements Disposable public void touchDown(float x, float y) { - if (state.downInMap(x, y)) + if (!blockMap && state.downInMap(x, y)) state.touchDown(); } public void touchUp(float x, float y) { - if (state.upInMap(x, y)) + if (!blockMap && state.upInMap(x, y)) state.touchUp(); } } |