Skip to content

Instantly share code, notes, and snippets.

@anzfactory
Created June 25, 2015 02:56
Show Gist options
  • Save anzfactory/4a206927d31d822a7313 to your computer and use it in GitHub Desktop.
Save anzfactory/4a206927d31d822a7313 to your computer and use it in GitHub Desktop.
itween callback sample
public class Hoge : MonoBehaviour {
void MoveA ()
{
Action callback = () => {
// 何か処理
};
iTween.MoveBy (gameObject, iTween.Hash("y",1f,"time",0.5f, "oncomplete", "Fin", "oncompleteparams", callback));
}
void MoveB ()
{
Action callback = () => {
// 何か処理
};
iTween.MoveBy (gameObject, iTween.Hash("y",1f,"time",0.5f, "oncomplete", "Fin", "oncompleteparams", callback));
}
void Fin(Action callback)
{
callback();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment