/// <summary> /// 此处的key与StartCoroutine的key保持一致 /// </summary> /// <param name="key"></param> public void StopCoroutine(string key) { CleanFinishedCoroutines(); if (!this.dict.ContainsKey(key)) { return; } this.dict.Remove(key); idPool.Despawn(key); mono.StopCachePausableCoroutine(key.ToGuid(this)); }
/// <summary> /// 此处的key与StartCoroutine的key保持一致 /// </summary> /// <param name="key"></param> public void StopCoroutine(string key) { if (!this.dict.ContainsKey(key)) { return; } this.dict.Remove(key); idPool.Despawn(key); mono.StopCacheIEnumerator(key.ToGuid(this)); }
public void RemoveDOTween(string key) { if (_dict.ContainsKey(key)) { Tween tween = _dict[key]; if (tween.IsActive()) { _dict[key].Kill(); } _idPool.Despawn(key); _dict.Remove(key); } }