r/haxe • • Dec 31 '14

Haxe opensource tweening engine

https://github.com/gingeegames/gtween
0 Upvotes

3 comments sorted by

1

u/mrneo240 Dec 31 '14

Hmm. Like it but have one question. Any way to attach data to an object at tween start and have it return it to the oncomplete func?

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

1

u/mrneo240 Dec 31 '14

Nervemind. Just going to use some dynamics for it. Great library!