derkork / godot-statecharts

A state charts extension for Godot 4
MIT License
679 stars 33 forks source link

make transition delay as expressioon as #122

Closed mrjshzk closed 1 month ago

mrjshzk commented 1 month ago

Hey! I was quite sleepy and made this pull request on accident, I didn't mean to also add the .import files sorry about that. Like you mentioned in another open PR, i changed now so that "delay_seconds" is an expression!

derkork commented 1 month ago

Hi, no worries, I'll figure something out. I'm sort of busy right now though, so may take a few more days until I can merge this. Thanks a lot for submitting the PR!

derkork commented 1 month ago

I ended up rewriting it from scratch as I needed to keep things backwards-compatible (e.g. you don't want to upgrade the library to find out that all your set delays are now reset to 0). There were also changes needed to support the transition_pending signal and to have predictable results with history states. I also added some documentation and a new example showing this in action. Thanks again for your PR!

mrjshzk commented 1 month ago

Cheers! Hope at least I helped in pointing for the right direction. 😄