Exemplo n.º 1
0
        public WaitUntilAudioClipStarted WaitForAudioClipStarted()
        {
            WaitUntilAudioClipStarted w = new WaitUntilAudioClipStarted(m_Player);

            if (m_Player != null)
            {
                m_Player.AddWaitUntilStartedInstruction(w);
            }
            return(w);
        }
Exemplo n.º 2
0
 public void AddWaitUntilStartedInstruction(WaitUntilAudioClipStarted i)
 {
     if (!m_WaitUntilStartedInstructions.Contains(i))
     {
         if (AudioSource != null && AudioSource.isPlaying)
         {
             // We're already playing!
             i.StopWaiting();
         }
         else
         {
             m_WaitUntilStartedInstructions.Add(i);
         }
     }
 }