Exemplo n.º 1
0
 public void Play(bool doPlay, Vector3 atPosition)
 {
     if (doPlay)
     {
         if (sound)
         {
             audioInstance = SECTR_AudioSystem.Play(sound, atPosition, false);
         }
         if (particle)
         {
             particle.Play();
         }
     }
     else
     {
         if (sound)
         {
             audioInstance.Stop(true);
         }
         if (particle)
         {
             particle.Stop();
         }
     }
 }
Exemplo n.º 2
0
 protected void PlayChatter(bool active)
 {
     if (active && !chatterInstance)
     {
         chatterInstance = SECTR_AudioSystem.Play(ChatterCue, transform.position, false);
     }
     else if (!active && chatterInstance)
     {
         chatterInstance.Stop(false);
     }
 }