Create add-joint! multimethod
This commit is contained in:
@@ -103,16 +103,6 @@
|
||||
[object k & options]
|
||||
`(u/call! ^Joint ~object ~k ~@options))
|
||||
|
||||
(defn create-joint!*
|
||||
[screen j-def]
|
||||
(box-2d! screen :create-joint j-def))
|
||||
|
||||
(defmacro create-joint!
|
||||
"Returns a [Joint](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/Joint.html)."
|
||||
[screen j-def & options]
|
||||
`(let [object# (create-joint!* ~screen ~j-def)]
|
||||
(u/calls! object# ~@options)))
|
||||
|
||||
; fixtures
|
||||
|
||||
(defmacro fixture-def
|
||||
@@ -220,6 +210,11 @@
|
||||
[screen b-def]
|
||||
(box-2d! screen :create-body b-def))
|
||||
|
||||
(defmethod c/add-joint!
|
||||
World
|
||||
[screen j-def]
|
||||
(box-2d! screen :create-joint j-def))
|
||||
|
||||
(defmethod c/physics-listeners
|
||||
World
|
||||
[screen
|
||||
|
||||
Reference in New Issue
Block a user