Add more body functions and move entities in step! function

This commit is contained in:
oakes
2014-01-17 21:11:20 -05:00
parent c25477e11d
commit 7dbf3509c9
2 changed files with 36 additions and 2 deletions

View File

@@ -234,7 +234,13 @@
(.step ^World world time-step velocity-iterations position-iterations)))
([screen entities]
(step! screen)
entities))
(map (fn [entity]
(if-let [body (:body entity)]
(assoc entity
:x (g2dp/body-x body)
:y (g2dp/body-y body))
entity))
entities)))
; cameras