cool lamb.
This commit is contained in:
@@ -423,6 +423,11 @@
|
||||
(sound! (or (snd e)
|
||||
(snd (:sounds entities))) :play vol 1.0 pan))))))
|
||||
|
||||
(defn update-from-room [screen entities]
|
||||
(if-let [update-fn (get-in entities [:room :update-fn])]
|
||||
(update-fn screen entities)
|
||||
entities))
|
||||
|
||||
|
||||
(defscreen scene
|
||||
:on-timer
|
||||
@@ -514,6 +519,7 @@
|
||||
entities (utils/apply-tweens screen entities (:tweens entities))
|
||||
entities (update-cursor screen entities)
|
||||
entities (update-from-script screen entities)
|
||||
entities (update-from-room screen entities)
|
||||
entities (update-from-hotspots screen entities)
|
||||
entities (assoc-in entities [:room :entities :ego :last-frame] (get-in entities [:room :entities :ego :object]))
|
||||
entities (update-in entities [:room :entities] (fn [entities]
|
||||
@@ -545,6 +551,8 @@
|
||||
layers (get-layers entities)
|
||||
|
||||
all-entities (concat (vals entities) layers (vals (get-in entities [:room :entities])))]
|
||||
(when (nil? (:zoom (:cam entities)))
|
||||
(println entities))
|
||||
(set! (. camera zoom) (:zoom (:cam entities)))
|
||||
(set! (.. camera position x) (:x (:cam entities) 160.0))
|
||||
(set! (.. camera position y) (:y (:cam entities) 120.0))
|
||||
|
||||
Reference in New Issue
Block a user