Skip to content

Commit

Permalink
Merge pull request #46 from 5thWall/main
Browse files Browse the repository at this point in the history
Fix tweens for current if-let behavior
  • Loading branch information
AlecTroemel authored Nov 20, 2023
2 parents 8ea84fa + adffa0a commit 8517c1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions junk-drawer/tweens.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))

0 comments on commit 8517c1b

Please sign in to comment.