Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Somoraze on August 02, 2013, 10:39:09 AM

Title: [Solved] How to call callback function when TweenAlpha finishes?
Post by: Somoraze on August 02, 2013, 10:39:09 AM
Hi,

EDIT:
OK I found out how to do it :

  1. public UITweener.OnFinished onFinished;
  2.  
  3. void Start(){
  4.         onFinished += Test;
  5. }
  6.        
  7. void Test (UITweener tween)
  8. {
  9.         Debug.Log ("test");
  10. }
  11.  
  12. void Update(){
  13.         if (Input.GetKey("f") ) {
  14.                 TweenAlpha.Begin(myButton, 1, 0).onFinished = onFinished;
  15.         }
  16. }

Hope this helps
Title: Re: [Solved] How to call callback function when TweenAlpha finishes?
Post by: andrejvojtas on August 29, 2013, 07:53:53 AM
Thank you, this is pure gold!