Rearrange texture constructor so reflection isn't needed
This commit is contained in:
@@ -46,12 +46,12 @@
|
|||||||
TextureRegion.)
|
TextureRegion.)
|
||||||
(isa? (type arg) Pixmap)
|
(isa? (type arg) Pixmap)
|
||||||
(-> ^Pixmap arg Texture. TextureRegion.)
|
(-> ^Pixmap arg Texture. TextureRegion.)
|
||||||
(isa? (type arg) TextureRegion)
|
(isa? (type arg) Texture)
|
||||||
arg
|
(-> ^Texture arg TextureRegion.)
|
||||||
(isa? (type arg) TextureEntity)
|
(isa? (type arg) TextureEntity)
|
||||||
(TextureRegion. ^TextureRegion (:object arg))
|
(-> ^TextureRegion (:object arg) TextureRegion.)
|
||||||
:else
|
:else
|
||||||
(TextureRegion. arg))))
|
arg)))
|
||||||
|
|
||||||
(defmacro texture
|
(defmacro texture
|
||||||
"Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html).
|
"Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html).
|
||||||
|
|||||||
Reference in New Issue
Block a user