Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
【Unity】iTweenでハマったことメモ ref: http://qiita.com/shori0917/items/686404e0cc8a5d80146c
void OnTriggerStay(Collider other) {
ins = Instantiate(PlusMoneyPrefab) as GameObject;
Vector3 startPosition = new Vector3(startX, startY, -1);
ins.transform.parent = Respawn.transform;
ins.transform.localPosition = startPosition;
ins.transform.localScale = new Vector3(50, 50, 0);
Hashtable parameters = new Hashtable();
parameters.Add("y", startY + 80);
parameters.Add("islocal", true);
parameters.Add("easeType", "easeInOutExpo");
parameters.Add("time", 2);
parameters.Add("oncomplete", "CompleteHandler");
parameters.Add("oncompletetarget", gameObject);
iTween.MoveTo(ins, parameters);
}
void CompleteHandler() {
Destroy (ins);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment