Add particle-effect

This commit is contained in:
oakes
2014-01-25 00:25:46 -05:00
parent 384fb39a37
commit 43b706dccc
4 changed files with 48 additions and 3 deletions

View File

@@ -226,6 +226,14 @@ with the tiled map file at `path` and `unit` scale
height (float (or height (.getTotalHeight object)))]
(.draw object batch x y width height)))
(defmethod draw-entity! :particle-effect
[^SpriteBatch batch {:keys [^ParticleEffect object x y]}]
(assert object)
(let [x (float (or x 0))
y (float (or y 0))]
(.setPosition object x y)
(.draw object batch (graphics! :get-delta-time))))
(defmethod draw-entity! :actor
[^SpriteBatch batch {:keys [^Actor object] :as entity}]
(assert object)