From a91cd1c364b826cc1f805f1bc0dfd6e6416986e7 Mon Sep 17 00:00:00 2001 From: oakes Date: Sat, 25 Jan 2014 12:03:05 -0500 Subject: [PATCH] Make particle-effect delta customizable --- src/play_clj/core_graphics.clj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj index 743e0ab..723b055 100644 --- a/src/play_clj/core_graphics.clj +++ b/src/play_clj/core_graphics.clj @@ -227,12 +227,13 @@ with the tiled map file at `path` and `unit` scale (.draw object batch x y width height))) (defmethod draw-entity! :particle-effect - [^SpriteBatch batch {:keys [^ParticleEffect object x y]}] + [^SpriteBatch batch {:keys [^ParticleEffect object x y delta-time]}] (assert object) (let [x (float (or x 0)) - y (float (or y 0))] + y (float (or y 0)) + delta-time (float (or delta-time (graphics! :get-delta-time)))] (.setPosition object x y) - (.draw object batch (graphics! :get-delta-time)))) + (.draw object batch delta-time))) (defmethod draw-entity! :actor [^SpriteBatch batch {:keys [^Actor object] :as entity}]