Created
April 7, 2022 22:56
-
-
Save MattRoelle/cf55070af51a9d35e608982fe846ccc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(λ do-attack [action] | |
(set action.to.animating true) | |
(set action.from.animating true) | |
(process-trigger-queue) | |
(let [mp (action.to.pos:midpoint action.from.pos)] | |
(timeline.parallel-tween | |
[0.5 action.to {:pos mp} :outBounce] | |
[0.5 action.from {:pos mp} :outBounce])) | |
(set action.from.animating false) | |
(set action.to.animating false) | |
(set action.from.t (- action.from.t action.to.p)) | |
(set action.to.t (- action.to.t action.from.p)) | |
(timeline.wait 0.35) | |
(check-dead action.from) | |
(check-dead action.to) | |
(process-trigger-queue)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment