private IEnumerator WaitAndDestroySound(AudioSource audioSource) { while (audioSource.isPlaying) { yield return(null); } soundSources.Remove(audioSource); Destroy(audioSource); }
public static void Delete(System.Collections.Generic.LinkedList <int> myLList, int index) { System.Collections.Generic.LinkedListNode <int> node = myLList.First; int positionList = 0; while (node != null) { if (positionList == index) { myLList.Remove(node); } positionList++; node = node.Next; } }
private System.Collections.IEnumerator delayFunc2(TimeCallback tc) { if (tc.deleted) { tc.time = -1; } while (Time.time < tc.time) { yield return(1); } if (!tc.deleted) { tc.ac(); } if (cdic != null) { cdic.Remove(tc); } }
public void Destroy(Timer timer) { timerList.Remove(timer); }