Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: jimbbq on April 24, 2014, 08:45:09 AM

Title: do something at the end of tween animation
Post by: jimbbq on April 24, 2014, 08:45:09 AM
Hi

I am trying to call a function at the end of a tweening animation, but I have no idea how to do this. Is there something like?

void onEndTween(){

}


thanks

Title: Re: do something at the end of tween animation
Post by: ArenMook on April 25, 2014, 05:31:59 AM
All tweens have the onFinished delegate. You can set it in inspector, or via code:
  1. TweenPosition tp = TweenPosition.Begin(...);
  2. EventDelegate.Add(tp.onFinished, YourFunction);
Title: Re: do something at the end of tween animation
Post by: jimbbq on April 25, 2014, 10:50:01 AM
thanks a lot for your help! you are a star!!!