public void Kill() { MonoBehaviour mono = transform.GetComponent <MonoBehaviour>(); mono.StopCoroutine(coroutine); IDOTween.getInstance().Remove(this); }
//控制单实例 public static IDOTween getInstance() { if (dotween == null) { dotween = new IDOTween(); } return(dotween); }
//constructor public Tween(string tid, Vector3 target, float duration, Transform transform, Coroutine coroutine) { this.tid = tid; this.target = target; this.duration = duration; this.transform = transform; this.coroutine = coroutine; IDOTween.getInstance().Add(this); }