This commit is contained in:
Bryce Covert
2016-08-01 18:36:05 -07:00
parent 9139a37119
commit 0a3b10b221
11 changed files with 96 additions and 64 deletions

View File

@@ -12,8 +12,8 @@
: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))
height (or height (if (instance? TextureRegion region ) (.getRegionHeight region) 0))
width (or width (if (instance? TextureRegion region ) (.getRegionWidth ^TextureRegion region) 0))
height (or height (if (instance? TextureRegion region ) (.getRegionHeight ^TextureRegion region) 0))
entity-x (- entity-x (* (or origin-x 0)
(or scale-x 1)))
entity-y (- entity-y (* (or origin-y 0)