Skip to content
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

FlxTween: add cancelChain() #1988

Merged
merged 4 commits into from
Nov 6, 2016

Conversation

seraku24
Copy link
Contributor

The existing FlxTween.cancel() function works fine when you want to stop a tween that is currently active and have it yield to the next tween in the chain (if one exists). However, the function does not help when you want to stop an entire tween chain, especially when the only reference you may hold is to the first tween in the chain. (NOTE: Use of FlxTween.wait() results in the creation of hidden tweens that cannot be cancelled.)

This PR introduces FlxTween.cancelChain(), a new function whose purpose is to allow user code to cancel all subsequent tweens that may be chained to a particular tween, even when the root tween has already finished. This helps simplify user code that relies on both chained tweening and the ability to cancel the animation at arbitrary times.

Added function cancelChain()
Added test cases for cancelChain()
@seraku24
Copy link
Contributor Author

seraku24 commented Oct 29, 2016

Code Climate reports it found issues with my PR; but, even after waiting about half a day, the details page still claims there is no analysis report available. If this automated testing is working as intended, how am I supposed to review and correct the issues?

@Gama11
Copy link
Member

Gama11 commented Oct 29, 2016

Hm.. that's quite odd, that's the first time I've seen "No analysis results present.".

@seraku24
Copy link
Contributor Author

@Gama11, glad to know I still have a knack for breaking systems the first time I encounter them. 😏

Joking aside, is there a way to manually run the same code quality checks? I did try to match the conventions and patterns in the files I modified; but, without a definitive list of guidelines, I cannot know for certain how my code stacks up.

Do let me know what, if anything, you need me to do from my side to help resolve this.

@Gama11 Gama11 changed the title Support cancellation of tween chain. FlxTween: add cancelChain() Nov 6, 2016
@Gama11 Gama11 merged commit 077c0ea into HaxeFlixel:dev Nov 6, 2016
@Gama11
Copy link
Member

Gama11 commented Nov 6, 2016

Thanks!

@seraku24 seraku24 deleted the seraku24-cancel-tween-chain branch November 6, 2016 19:00
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this pull request Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants