another candle.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
(if (= :main cursor)
|
||||
(:script entity)
|
||||
(when-let [scripts (:scripts entity)]
|
||||
(scripts (:value cursor)))))})))
|
||||
(or (scripts (:value cursor)) (scripts :default)))))})))
|
||||
(defn make [& {:keys [collision interactions entities] :as params}]
|
||||
(let [interactions-as-list (for [[id spec] interactions]
|
||||
(merge spec {:mouse-in? (fn [_ x y]
|
||||
@@ -35,7 +35,7 @@
|
||||
(if (= :main cursor)
|
||||
(:script spec)
|
||||
(when-let [scripts (:scripts spec)]
|
||||
(scripts (:value cursor)))))
|
||||
(or (scripts (:value cursor)) (scripts :default)))))
|
||||
:id id}))
|
||||
entities (into {} (for [[id entity] entities]
|
||||
[id (make-entity id entity)]))]
|
||||
|
||||
Reference in New Issue
Block a user