summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/screens
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-29 23:51:20 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-29 23:51:20 +0200
commitd3b9d0f40f23d9ae6439e733a7e41c0d0a2899c3 (patch)
tree9a77056bc2741566cad5e134f7868babb754c5f0 /core/src/ch/asynk/tankontank/screens
parent6e04839bd5e0189e99d72a20d7dce6d918fb4439 (diff)
downloadRustAndDust-d3b9d0f40f23d9ae6439e733a7e41c0d0a2899c3.zip
RustAndDust-d3b9d0f40f23d9ae6439e733a7e41c0d0a2899c3.tar.gz
add lineOfSight testing code
Diffstat (limited to 'core/src/ch/asynk/tankontank/screens')
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java
index 1f4e986..6a0c715 100644
--- a/core/src/ch/asynk/tankontank/screens/GameScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java
@@ -156,6 +156,9 @@ public class GameScreen implements Screen
} else if (button == Input.Buttons.RIGHT) {
cam.unproject(touchPos.set(x, y, 0));
map.showMoves(touchPos.x, touchPos.y);
+ } else {
+ cam.unproject(touchPos.set(x, y, 0));
+ map.lineOfSight(touchPos.x, touchPos.y);
}
return true;
}