This commit is contained in:
Bryce Covert
2017-05-31 20:00:33 -07:00
parent 6580bbb52b
commit 67cbac3dbd
42 changed files with 398 additions and 167 deletions

View File

@@ -13,8 +13,7 @@
:mouse-in? (fn [entities x y]
(let [e (utils/get-entity entities id)]
(if-let [[bx1 by1 bx2 by2] (:box e)]
(do (println "checking 1" id)
(zone/within bx1 by1 bx2 by2 x y))
(zone/within bx1 by1 bx2 by2 x y)
(let [{^float entity-x :x ^float 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} (-> entities :room :entities id)
width (or width (if (instance? TextureRegion region ) (.getRegionWidth ^TextureRegion region) 0))