Update example to reflect API change

This commit is contained in:
oakes
2014-01-12 15:03:16 -05:00
parent 87eb343e48
commit 760cee44da

View File

@@ -60,12 +60,10 @@ There are currently no tutorials or generated docs, because play-clj is changing
; this function runs when the screen dimensions change ; this function runs when the screen dimensions change
:on-resize :on-resize
(fn [screen entities] (fn [screen entities]
; make the camera 20 tiles high, and adjust the width appropriately ; make the camera 20 tiles high, while maintaining the aspect ratio
(let [height 20 (height! screen 20)
width (* height (/ (game :width) (game :height)))] ; you can return nil if you didn't change any entities
(resize-camera! screen width height)) nil))
; return the entities list unmodified
entities))
; define the game itself, and immediately hand off to the screen ; define the game itself, and immediately hand off to the screen
(defgame game-test (defgame game-test