-
Notifications
You must be signed in to change notification settings - Fork 125
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
Canceling / destroying a tween collection #76
Comments
Do you only want a subset of the tweens that you put in the GoTweenFlow to
On Mon, Mar 7, 2016 at 4:41 AM, Matthijs Kooijman notifications@github.com
|
No, I want to destroy them all. Looking at the code, GoTweenFlow does not override destroy(), so that would only make GoAbstractTweenCollection set its state to destroyed, not actually destroy the contained tweens. Though I haven't actually tested this, so I might have missed some bit of the code that makes this work, of course... |
So to answer your question, there's a bit of context to give: The only thing GoKit does with tweens is keep them in a list to update them Whenever you set any AbstractGoTween (which includes GoTween, GoTweenChain When Go.cs is looping through all running tweens, it will remove that class The reason why you don't need to worry about the internal list of Tweens In short, whenever you want to remove all the tweens in a GoTweenFlow, just Hope this helps!
On Mon, Mar 7, 2016 at 12:33 PM, Matthijs Kooijman <notifications@github.com
|
Ah, I see. I was assuming that the other subclasses of AbstractGoTween would actually do something to remove themselves from the main list of running tweens in their destroy() methods, but that happens automatically by setting their state to destroyed, right. Thanks for taking the time to explain, my doubts are answered! I should have just tried, instead of trying to figure out the code first :-p |
I have a number of related tweens which should run simultaneously and, sometimes, be canceled halfway collectively. I was hoping to use some kind of collection (GoTweenFlow seems promising) to manage these tweens, but AFAICS I can then only pause the tweens, not actually stop / destroy them through the collection. I would have to keep a separate list of tweens to call destroy() on, pretty much voiding the goal of the collection.
Am I missing something, or is this something that could/should be added?
The text was updated successfully, but these errors were encountered: