Quantcast
Channel: Questions in topic: "moveto"
Viewing all articles
Browse latest Browse all 116

itween moveto not working

$
0
0
Hi, i'm facing a problem which unable to trigger my own method after the iTween.MoveTo(..) finished run. My Code using UnityEngine; using System.Collections; public class InGameScript : MonoBehaviour { public Transform cardPrefab; void Awake(){ } void Update () { } void Start(){ GameObject selectedObj = (Instantiate(cardPrefab, _position, Quaternion.identity) as Transform).gameObject; Vector3[] pos = new Vector3[2]; card3[0] = new Vector3(-1.04f, -1.41f, 0);//to card3[1] = new Vector3(-1.04f, -1.41f, 0);//to Hashtable hh = new Hashtable(); hh.Add("path",pos); hh.Add("speed",10); hh.Add("delay",1); hh.Add("easetype",iTween.EaseType.easeInQuint); hh.Add("oncomplete","OnMoveComplete"); hh.Add("oncompletetarget",selectedObj); iTween.MoveTo(selectedObj, hh); } void OnMoveComplete() { Debug.Log("Testing"); } } itween's parameters reference : http://itween.pixelplacement.com/documentation.php Please advise. Thanks, jenz

Viewing all articles
Browse latest Browse all 116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>