protected virtual void Start() { if (!CUtils.EqualVector3(transform.position, pointA.position)) { iTween.MoveTo(gameObject, iTween.Hash("position", pointA.position, "speed", speed, "easeType", easetype, "oncomplete", "OnMoveToPointComplete")); } else { OnMoveToPointComplete(); } }
private void Start() { pointA = new Vector3(fromX, transform.position.y, transform.position.z); pointB = new Vector3(toX, transform.position.y, transform.position.z); if (!CUtils.EqualVector3(transform.position, pointA)) { iTween.MoveTo(gameObject, iTween.Hash("position", pointA, "speed", speed, "easeType", iTween.EaseType.linear, "oncomplete", "OnMoveToPointComplete")); } else { OnMoveToPointComplete(); } }
private void OnStart() { if (temp == null) { enabled = false; return; } if (!CUtils.EqualVector3(transform.position, pointA)) { iTween.MoveTo(temp, iTween.Hash("position", pointA, "speed", speed, "easeType", easyType, "oncomplete", "OnMoveToPointComplete", "oncompletetarget", gameObject, "onupdatetarget", gameObject, "onupdate", "OnUpdate")); } else { OnMoveToPointComplete(); } enabled = false; }