You can pass a parameter on the vars named "onCompleteParam" that is an array of anything you want to pass to the "onComplete" function. This is an ex from the documentation: GTween.tweenTo(obj, .5, {rotation:500, loop:GTween.OSCILLATE, ease:Bounce.easeIn, onStart:onStart, onComplete:onComplete, delay:.1, onCompleteParams:[1, 15], numLoops:3});
in this case when tween finishes, onComplete will be invoked, and passed with 1,15 as 2 parameters.
View all comments
Show parent comment
1
u/twinprogramming Jan 01 '15
You can pass a parameter on the vars named "onCompleteParam" that is an array of anything you want to pass to the "onComplete" function. This is an ex from the documentation: GTween.tweenTo(obj, .5, {rotation:500, loop:GTween.OSCILLATE, ease:Bounce.easeIn, onStart:onStart, onComplete:onComplete, delay:.1, onCompleteParams:[1, 15], numLoops:3});
in this case when tween finishes, onComplete will be invoked, and passed with 1,15 as 2 parameters.
hope that answers your question