ceceppa / anima

Godot: run sequential and parallel animations with less code
https://anima.ceceppa.me/
MIT License
691 stars 22 forks source link

Anima_on_started/compleleted will not work well at sometimes in Godot 4 #33

Closed hakuhan closed 1 year ago

hakuhan commented 1 year ago

Hi! I just start to use this amazing tool. But there are few issues I got:

For this issue. I checked from code(tween.gd). And I found that fn.callv(args) will not call function with none parameter 图片

For first issue. I tried to remove "[null]" parameter from callabacks. And call "fn.call()" instead of "fn.callv(args)". But I also want to listent to your advice for this issue. For the rest issues. I didn't step deep into codes. Please take look if you have time. Thanks!

ceceppa commented 1 year ago

Yes, this PR fixes the issue: https://github.com/ceceppa/anima/pull/36.

The on_started not being called when using a null argument was caused by: https://github.com/ceceppa/anima/pull/36/files#diff-2a929f738ff4410e24f987f0c0c4a3b030487341a75e129618db01dbd7158fdeR42

The wrong order of calling because of the wrong delay: https://github.com/ceceppa/anima/pull/36/files#diff-a2f081ee8c7097b2792a05cfc65703a7c706e7dacdc82e6fa2c365bc079359e7L188