123456789101112131415161718192021222324252627282930 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using DG.Tweening;
- using UnityEngine.UI;
- public class feixing : MonoBehaviour
- {
- int ct = 0;
- public List<GameObject> feixingdian = new List<GameObject>();
- 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);
- }
- }
|