Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: thelemonpeople on January 29, 2015, 06:12:07 PM
-
Hi guys,
I am working on the UI for my company's next game and as a high level user (non-code) I would like to know if there is a way to delay running a script when using the UIPlayTween component.
The situation is thus:
I click a button on a menu: a UIPlayTween tweens all elements of group 0 off-screen and another UIPlayTween tweens the next menu's buttons, group 1, on-screen.
This also triggers a camera animation for a 3D background that takes a second.
Ideally I'd like to be able to set a delay in the UIPlayTween component so that the second tween, (group 1) is timed to play after the 3D BG anim.
I guess I could get my coder to modify the script to add a delay field but of course that would jeopardise future NGUI updates.
Another option would be to include the delay in the tweens' curves but that's pretty hard to maintain/edit when changes are needed.
Did I miss an alternative way to achieve this without scripting? If not, would there be any chance of seeing a time delay added to UIPlayTween in a future NGUI release?
Thanks,
PS: NGUI has made my life so much easier, keep on the good work, you rock. ( >_<)/,,/
-
Non-code? Just adjust the curve.
For example, you want a tween that has a 1 second delay then tweens over 2 seconds. Total time would be 3 seconds, so set that as the duration.
Now adjust the curve so that it begins at 0.333 instead of 0.