Hi!
In javascript, how can I do a function that is executed once after an iTween animation has finished?
like
function something()
{
//Do something
}
function Update()
{
iTween.MoveTo(GO, iTween.Hash("x", 0), something);
}
Hi!
In javascript, how can I do a function that is executed once after an iTween animation has finished?
like
function something()
{
//Do something
}
function Update()
{
iTween.MoveTo(GO, iTween.Hash("x", 0), something);
}
Umm, have you tried this?
iTween.MoveTo(GO, iTween.Hash("x", 0, "oncomplete", "something", "oncompletetarget", this.gameObject));
OnComplete specifies the name of the function which is to be called when it completes.
There are other similar ones too, like OnStart etc.
You can find everything here:
http://itween.pixelplacement.com/jsarchive.php