-
Notifications
You must be signed in to change notification settings - Fork 76
Run a one-shot system upon completion of Tween or Delay #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I tried my best to include some unit tests to maintain symmetry with the other "with_completed" methods, but I ran into a snag when dealing with the tick tests. I had to create some dummy values in Oh, and I just realized I forgot to update the examples. I can get to that as soon as I get some feedback on what I managed to to commit so far :) |
djeedai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change makes sense, thanks a lot! Couple of comments on docs, and I don't know why it seems CI didn't start? I'll check that too as I expect docs won't build. Other than that looks good to me.
Peepo-Juice
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was as a result of me trying to update my local repo and manage a conflict. I feel like I screwed up and created this ugly commit. My bad! I'm still getting the hang of Git.
djeedai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm conceptually on board but there's a number of minor things to fix. Let me know if you don't have time to, I can take over and finish it. Thanks!
This PR adds with_completed_system() and other related methods to allow the user to run a one-shot system when an animation or delay completes.
The main reason why I wanted to add this is to avoid polling for a single non-repeating event; using one-shot systems can be cleaner sometimes. But there are other use-cases like chaining actions or even other animations that cant be chained normally due to limitations in the library. In those cases you may think to use callbacks, but they don't allow you to easily interact with the world, which makes one-shot systems a necessity.