Move step! to the physics namespace where it belonds

This commit is contained in:
oakes
2014-01-18 23:19:20 -05:00
parent 70d613f91f
commit eefe6318cf
3 changed files with 19 additions and 23 deletions

View File

@@ -234,25 +234,6 @@
(render! screen)
(draw! screen entities)))
; physics
(defn step!
([{:keys [world time-step velocity-iterations position-iterations]
:or {time-step (/ 1 60) velocity-iterations 10 position-iterations 10}}]
(assert world)
(cond
(isa? (type world) World)
(.step ^World world time-step velocity-iterations position-iterations)))
([screen entities]
(step! screen)
(map (fn [entity]
(if-let [body (:body entity)]
(assoc entity
:x (g2dp/body-x body)
:y (g2dp/body-y body))
entity))
entities)))
; cameras
(defn orthographic*