Refactor for better organization

This commit is contained in:
oakes
2014-01-11 23:52:08 -05:00
parent 90d52fca26
commit 1509726492
2 changed files with 169 additions and 171 deletions

View File

@@ -70,6 +70,10 @@
(u/calls! ^TextureRegion (:object entity#) ~@options)
entity#))
(defmacro texture!
[entity k & options]
`(u/call! ^TextureRegion (:object ~entity) ~k ~@options))
(defmacro animation
[duration textures & args]
`(Animation. ~duration
@@ -82,9 +86,3 @@
(texture* (.getKeyFrame animation total-time true)))
([{:keys [total-time]} ^Animation animation is-looping?]
(texture* (.getKeyFrame animation total-time is-looping?))))
; interop
(defmacro texture!
[entity k & options]
`(u/call! ^TextureRegion (:object ~entity) ~k ~@options))