using System.Collections; using System.Collections.Generic; using UnityEngine; using DG.Tweening; using UnityEngine.UI; public class feixing : MonoBehaviour { int ct = 0; public List feixingdian = new List(); void Start() { next(); } public void next() { this.transform.DOMove(feixingdian[ct].transform.position, Vector3.Distance(this.transform.position, feixingdian[ct].transform.position) * 0.01f).OnComplete(()=> { ct++; if(feixingdian.Count <= ct) { ct = 0; } next(); }).SetEase(Ease.Linear); this.transform.DOLookAt(feixingdian[ct].transform.position,5f); } }