Add joint! macro
This commit is contained in:
@@ -93,6 +93,10 @@
|
||||
`(let [object# (~(joint-init k))]
|
||||
(u/fields! object# ~@options)))
|
||||
|
||||
(defmacro joint!
|
||||
[object k & options]
|
||||
`(u/call! ^Joint ~object ~k ~@options))
|
||||
|
||||
(defn create-joint!*
|
||||
[screen j-def]
|
||||
(box-2d! screen :create-joint j-def))
|
||||
@@ -110,6 +114,10 @@
|
||||
(u/fields! object# ~@options)
|
||||
object#))
|
||||
|
||||
(defmacro fixture!
|
||||
[object k & options]
|
||||
`(u/call! ^Fixture ~object ~k ~@options))
|
||||
|
||||
; shapes
|
||||
|
||||
(defn chain*
|
||||
@@ -170,10 +178,6 @@
|
||||
[object k & options]
|
||||
`(u/call! ^Contact ~object ~k ~@options))
|
||||
|
||||
(defmacro fixture!
|
||||
[object k & options]
|
||||
`(u/call! ^Fixture ~object ~k ~@options))
|
||||
|
||||
(defn find-body
|
||||
[body entities]
|
||||
(some #(if (= body (:body %)) %) entities))
|
||||
|
||||
Reference in New Issue
Block a user