Exemplo n.º 1
0
 public void OnUpdate()
 {
     if (!GameKillAudioSource.isPlaying && GameKillClipList.Count > 0)
     {
         AudioClip adClip = GameKillClipList [0];
         GameKillAudioSource.clip = adClip;
         GameKillAudioSource.Play();
         GameKillClipList.Remove(adClip);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 播放击杀音效
 /// </summary>
 /// <param name="adClip"></param>
 public void PlayGameKillAudio(AudioClip adClip)
 {
     GameKillClipList.Add(adClip);
 }