Make the camera position functions work on vector-2 and vector-3 objects

This commit is contained in:
oakes
2014-05-09 21:42:11 -04:00
parent a1f269a0bf
commit ffec7a11ab
3 changed files with 83 additions and 51 deletions

View File

@@ -27,6 +27,7 @@
IsometricStaggeredTiledMapRenderer
IsometricTiledMapRenderer
OrthogonalTiledMapRenderer]
[com.badlogic.gdx.math Vector2 Vector3]
[com.badlogic.gdx.scenes.scene2d Actor Stage]
[com.badlogic.gdx.scenes.scene2d.utils ActorGestureListener Align
ChangeListener ClickListener DragListener FocusListener]
@@ -202,10 +203,10 @@ via the screen map.
entities)
:on-pinch ; the user performed a pinch zoom gesture
(fn [screen entities]
(println (:initial-pointer-1 screen)) ; the x/y start position of finger 1
(println (:initial-pointer-2 screen)) ; the x/y start position of finger 2
(println (:pointer-1 screen)) ; the x/y end position of finger 1
(println (:pointer-2 screen)) ; the x/y end position of finger 2
(println (:initial-pointer-1 screen)) ; the start position of finger 1 (see the x and y functions)
(println (:initial-pointer-2 screen)) ; the start position of finger 2 (see the x and y functions)
(println (:pointer-1 screen)) ; the end position of finger 1 (see the x and y functions)
(println (:pointer-2 screen)) ; the end position of finger 2 (see the x and y functions)
entities)
:on-tap ; the user tapped
(fn [screen entities]
@@ -380,10 +381,10 @@ via the screen map.
:on-ui-pinch ; the user performed a pinch zoom gesture
(fn [screen entities]
(println (:event screen)) ; the InputEvent - http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/InputEvent.html
(println (:initial-pointer-1 screen)) ; the x/y start position of finger 1
(println (:initial-pointer-2 screen)) ; the x/y start position of finger 2
(println (:pointer-1 screen)) ; the x/y end position of finger 1
(println (:pointer-2 screen)) ; the x/y end position of finger 2
(println (:initial-pointer-1 screen)) ; the start position of finger 1 (see the x and y functions)
(println (:initial-pointer-2 screen)) ; the start position of finger 2 (see the x and y functions)
(println (:pointer-1 screen)) ; the end position of finger 1 (see the x and y functions)
(println (:pointer-2 screen)) ; the end position of finger 2 (see the x and y functions)
entities)
:on-ui-tap ; the user tapped
(fn [screen entities]