summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-01-05 14:51:51 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-01-05 14:51:51 +0100
commitd02429526b4bf74e21583f69a81e84d7679914f2 (patch)
treecc7029e8f6ef96f51bb7d4e0dad674a56eaa2c65 /core/src/ch/asynk/tankontank
parent98f4cf22523ded23f371d4cee4a3e8c1363a037c (diff)
downloadRustAndDust-d02429526b4bf74e21583f69a81e84d7679914f2.zip
RustAndDust-d02429526b4bf74e21583f69a81e84d7679914f2.tar.gz
MenuCamera: uiUnproject(Vector3) -> uiUnproject(float, float, Vector3)
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/screens/MenuCamera.java4
-rw-r--r--core/src/ch/asynk/tankontank/screens/MenuScreen.java3
2 files changed, 3 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/screens/MenuCamera.java b/core/src/ch/asynk/tankontank/screens/MenuCamera.java
index ec5f48a..d71d839 100644
--- a/core/src/ch/asynk/tankontank/screens/MenuCamera.java
+++ b/core/src/ch/asynk/tankontank/screens/MenuCamera.java
@@ -59,9 +59,9 @@ public class MenuCamera extends OrthographicCamera
return window.height;
}
- public Vector3 uiUnproject(Vector3 v)
+ public Vector3 uiUnproject(float x, float y, Vector3 v)
{
- return uiCamera.unproject(v);
+ return uiCamera.unproject(v.set(x, y, 0f));
}
public Matrix4 uiCombined()
diff --git a/core/src/ch/asynk/tankontank/screens/MenuScreen.java b/core/src/ch/asynk/tankontank/screens/MenuScreen.java
index 9c2febd..cc6d567 100644
--- a/core/src/ch/asynk/tankontank/screens/MenuScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/MenuScreen.java
@@ -93,8 +93,7 @@ public class MenuScreen implements Screen
@Override
public boolean touchDown(int x, int y, int pointer, int button)
{
- touch.set(x, y, 0f);
- camera.uiUnproject(touch);
+ camera.uiUnproject(x, y, touch);
return hit(touch.x, touch.y);
}
});