more detail on the screen.

This commit is contained in:
2014-12-08 23:27:08 -08:00
parent b4cbd5dbea
commit 546bbccb3d
6 changed files with 63 additions and 15 deletions

View File

@@ -273,6 +273,12 @@
(if (:anim entity)
[id (animate entity screen)]
[id entity])))))
entities (update-in entities [:room :entities] (fn [entities]
(into entities
(for [[id entity] entities]
(if (:update-fn entity)
[id ((:update-fn entity) screen entities entity)]
[id entity])))))
all-entities (concat (vals entities) (get-in entities [:room :layers]) (vals (get-in entities [:room :entities])))]
(label! (:fps entities) :set-text (str (game :fps)))
(render! screen (sort-by :baseline all-entities))