diff --git a/common/src/play_clj/core.clj b/common/src/play_clj/core.clj index 5afee5f..9c98e4b 100644 --- a/common/src/play_clj/core.clj +++ b/common/src/play_clj/core.clj @@ -37,6 +37,7 @@ :delta-time 0) on-show vec + flatten (reset! entities))) (render [delta-time] (let [total-time (+ (:total-time @screen) delta-time) @@ -46,6 +47,7 @@ (->> (on-render screen-map @entities) (remove nil?) vec + flatten (reset! entities) (draw! screen-map)))) (hide [] (on-hide @screen)) diff --git a/common/src/play_clj/core_2d.clj b/common/src/play_clj/core_2d.clj index ce9ec7c..4577025 100644 --- a/common/src/play_clj/core_2d.clj +++ b/common/src/play_clj/core_2d.clj @@ -47,6 +47,6 @@ (defn get-key-frame ([screen ^Animation animation] - (get-key-frame screen animation true)) + (.getKeyFrame animation (:total-time screen) true)) ([screen ^Animation animation is-looping?] (.getKeyFrame animation (:total-time screen) is-looping?)))