Rename physics namespace

This commit is contained in:
oakes
2014-01-16 00:50:22 -05:00
parent cb5e5f7461
commit 23bbcfb698
2 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
(ns play-clj.g2d-physics
(:require [play-clj.math :as m]
[play-clj.utils :as u])
(:import [com.badlogic.gdx.physics.box2d World]))
(defn world*
([]
(world* 0 0 true))
([gravity-x gravity-y]
(world* gravity-x gravity-y true))
([gravity-x gravity-y sleep?]
(World. (m/vector-2 gravity-x gravity-y) sleep?)))
(defmacro world
[gravity-x gravity-y & options]
`(let [object# (world* ~gravity-x ~gravity-y)]
(u/calls! ^World object# ~@options)
object#))
(defmacro world!
[{:keys [^World world]} k & options]
`(u/call! ^World ~world ~k ~@options))