Ejemplo n.º 1
0
 private void SelfDestroy()
 {
     if (base.gameObject.transform.parent == BugFixAudio.PlayOnceRoot.transform)
     {
         UnityEngine.Object.Destroy(base.gameObject);
     }
     else
     {
         TsAudioPlayingList.Remove(base.audio.clip.name);
     }
 }
Ejemplo n.º 2
0
 public void Awake()
 {
     if (base.gameObject.activeInHierarchy && base.audio != null && base.audio.clip != null && base.audio.playOnAwake && !TsAudio.IsMuteAudioType(this.AudioType))
     {
         if (this.GetAudioEx().baseData.SkipIfPlayingSame)
         {
             if (TsAudioPlayingList.isPlaying(base.audio.clip.name))
             {
                 base.audio.playOnAwake = false;
                 base.audio.Stop();
             }
             else
             {
                 TsAudioPlayingList.Add(base.audio.clip.name, null);
                 this.DestroyAfter(base.audio.clip.length);
             }
         }
     }
     else
     {
         this.GetAudioEx().OnAwake(this);
     }
 }