more tweaks for wizard.
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
(defn make-entity [id entity]
|
||||
(merge entity
|
||||
{:mouse-in? (fn [entities x y]
|
||||
(let [{entity-x :x entity-y :y width :width height :height region :object} (get-in entities [:room :entities id])
|
||||
(let [{entity-x :x entity-y :y width :width scale-x :scale-x scale-y :scale-y height :height region :object} (get-in entities [:room :entities id])
|
||||
width (or width (.getRegionWidth region))
|
||||
height (or height (.getRegionHeight region))]
|
||||
((zone/box entity-x entity-y (+ entity-x width) (+ entity-y height)) x y)))}
|
||||
((zone/box entity-x entity-y (+ entity-x (* width (or 1 scale-x))) (+ entity-y (* height (or scale-y 1)))) x y)))}
|
||||
(when (:script entity)
|
||||
{:get-script (fn [cursor [x y]]
|
||||
(if (= :main cursor)
|
||||
|
||||
Reference in New Issue
Block a user