private IEnumerator WaitAndDestroySound(AudioSource audioSource)
    {
        while (audioSource.isPlaying)
        {
            yield return(null);
        }

        soundSources.Remove(audioSource);
        Destroy(audioSource);
    }
Ejemplo n.º 2
0
    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;
        }
    }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 public void Destroy(Timer timer)
 {
     timerList.Remove(timer);
 }