1
NGUI 3 Support / Cannot modify UITweener delegates within such a delegate
« on: March 28, 2014, 02:09:32 PM »
Hi,
I'm trying to make a very simple utilisation of UITweener and onFinished delegates.
Basically, I am scaling down a dialogue window. Once I receive the onFinished delegate (which I called FadeOutDone), I check to see if I have more dialogue lines to display. If so, I must scale back up, and would like to have a new onFinished delegate called FadeInDone.
However, since the delegates are "backed-up" and restored by the UITweener class, this code cannot work, even though I feel like it should be legal. I could use always the same delegate (FadeDone) but the code would not be as clean. I could also use the deprecated callWhenFinished system, which I'd like to avoid.
Is there a clean way to do this with the current system?
Why are delegates backed up, cleared and restored by the UITweener?
Thanks.
I'm trying to make a very simple utilisation of UITweener and onFinished delegates.
Basically, I am scaling down a dialogue window. Once I receive the onFinished delegate (which I called FadeOutDone), I check to see if I have more dialogue lines to display. If so, I must scale back up, and would like to have a new onFinished delegate called FadeInDone.
However, since the delegates are "backed-up" and restored by the UITweener class, this code cannot work, even though I feel like it should be legal. I could use always the same delegate (FadeDone) but the code would not be as clean. I could also use the deprecated callWhenFinished system, which I'd like to avoid.
Is there a clean way to do this with the current system?
Why are delegates backed up, cleared and restored by the UITweener?
Thanks.
