iTweenPath.cs 364 B

12345678910111213141516
  1. using UnityEngine;
  2. using System.Collections;
  3. public class iTweenPath : MonoBehaviour{
  4. public Transform[] path;
  5. public float m_time = 1f;
  6. void OnDrawGizmos(){
  7. iTween.DrawPath(path);
  8. }
  9. void Start(){
  10. iTween.MoveTo(gameObject,iTween.Hash("path",path,"time",1,"easetype",iTween.EaseType.linear,"looptype",iTween.LoopType.loop,"movetopath",false));
  11. }
  12. }