diff --git a/junk-drawer/tweens.janet b/junk-drawer/tweens.janet index e3e70a6..5253120 100644 --- a/junk-drawer/tweens.janet +++ b/junk-drawer/tweens.janet @@ -176,7 +176,7 @@ examples/07-tweens.janet for more! :table (merge (current key) val)))) # Tick the tweens elapsed time, delete it if we've reached its duration - (if-let [new-elapsed (+ elapsed 1) - complete? (> new-elapsed duration)] - (remove-entity wld tween-ent) - (put tween-data :elapsed-time new-elapsed)))) + (let [new-elapsed (+ elapsed 1)] + (if (>= elapsed duration) + (remove-entity wld tween-ent) + (put tween-data :elapsed-time new-elapsed)))))