Force entities list to be a vector, and rename function
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
:total-time 0
|
||||
:delta-time 0)
|
||||
on-show
|
||||
vec
|
||||
(reset! entities)))
|
||||
(render [delta-time]
|
||||
(let [total-time (+ (:total-time @screen) delta-time)
|
||||
@@ -43,6 +44,8 @@
|
||||
:total-time total-time
|
||||
:delta-time delta-time)]
|
||||
(->> (on-render screen-map @entities)
|
||||
(remove nil?)
|
||||
vec
|
||||
(reset! entities)
|
||||
(draw! screen-map))))
|
||||
(hide [] (on-hide @screen))
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
(utils/static-field :graphics :g2d :Animation
|
||||
~(or (first args) :normal))))
|
||||
|
||||
(defn get-animation-frame
|
||||
(defn get-key-frame
|
||||
([screen ^Animation animation]
|
||||
(get-animation-frame screen animation true))
|
||||
(get-key-frame screen animation true))
|
||||
([screen ^Animation animation is-looping?]
|
||||
(.getKeyFrame animation (:total-time screen) is-looping?)))
|
||||
|
||||
Reference in New Issue
Block a user