Exemplo n.º 1
0
 public PlayingEvent PlayEvent(string name, float delay)
 {
     if (Mathf.Approximately(delay, 0.0f))
     {
         AudioEventBase e = _db.FindEventDataByName(name);
         if (e != null)
         {
             PlayingEvent p = e.Play();
             Log(string.Format("Started playing event {0}", name));
             return(p);
         }
         else
         {
             Log(string.Format("Could not find audio event: {0}", name));
         }
     }
     else
     {
         _component.StartCoroutine(DelayedPlayEvent(name, delay));
     }
     return(null);
 }
Exemplo n.º 2
0
 public PlayingEvent(AudioEventBase eventRef, float start)
 {
     Event     = eventRef;
     StartTime = start;
     Sources   = new List <PooledAudioSource>();
 }