hack for making centering work.

This commit is contained in:
=
2014-09-10 14:29:32 -07:00
committed by Remington Covert
parent 4cea69ef47
commit fd16a41cce

View File

@@ -21,10 +21,10 @@
(defrecord TextureEntity [object] Entity
(draw! [{:keys [^TextureRegion object x y width height
scale-x scale-y angle origin-x origin-y]}
_
batch]
(let [x (float (or x 0))
scale-x scale-y angle origin-x origin-y]}
_
batch]
(let [x (- (float (or x 0)) (* (float (or origin-x 0.0)) (float (or scale-x 1.0))))
y (float (or y 0))
width (float (or width (.getRegionWidth object)))
height (float (or height (.getRegionHeight object)))]