public void Kill() { MonoBehaviour mono = transform.GetComponent <MonoBehaviour>(); mono.StopCoroutine(coroutine); IDOTween.getInstance().Remove(this); }
//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); }