Created
April 7, 2022 22:53
-
-
Save MattRoelle/52ab6c7b28c4e100b5ba9fda73f7ac45 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.from {:pos action.to.pos} :outBounce])) | |
;[0.5 action.from {:pos mp} :outBounce])) | |
(set action.from.animating false) | |
(set action.to.animating false) | |
(set action.from.attacks-remaining (- (or action.from.attacks-remaining 1) 1)) | |
(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