Allow size! to work with any camera

This commit is contained in:
oakes
2014-03-24 00:02:54 -04:00
parent ba7bb6df2b
commit 78e724408a

View File

@@ -45,8 +45,10 @@
(size! screen 480 360)"
[screen width height]
(let [^OrthographicCamera camera (u/get-obj screen :camera)]
(.setToOrtho camera false width height)))
(let [^Camera camera (u/get-obj screen :camera)]
(set! (. camera viewportWidth) width)
(set! (. camera viewportHeight) height)
(.update camera)))
(defn width!
"Sets the width of the camera in `screen`, adjusting the height so the ratio