you must click the same target to have a script kick off.

This commit is contained in:
Bryce Covert
2015-08-14 21:26:01 -07:00
parent 58fff2d34f
commit c181b4f7e6
2 changed files with 60 additions and 33 deletions

View File

@@ -8,7 +8,8 @@
(defn make-entity [id entity]
(merge entity
{:mouse-in? (fn [entities x y]
{:id id
:mouse-in? (fn [entities x y]
(let [{entity-x :x entity-y :y width :width scale-x :scale-x scale-y :scale-y origin-x :origin-x origin-y :origin-y height :height region :object} (get-in entities [:room :entities id])
width (or width (if (instance? TextureRegion region ) (.getRegionWidth region) 0))