public override void Execute() { if (_objMusic != null) { AudioManager.DestroyAudio(_objMusic); } // _objMusic = AudioManager.PlaySound(_realInfo.musicName, 0, 0, 0, 0); // _objMusic.SetLoop(_realInfo.bLoop); _objMusic = AudioManager.CreateAudio(_realInfo.musicName, _realInfo.bLoop); _objMusic.SetVolume(_realInfo.volume); }
public static void ReturnFx(AudioObject audio) { if (audio != null) { m_lstAudios.Add(audio); } }
public static void DestroyAudio(AudioObject audio) { if (audio == null) return; GameObject.Destroy(audio.gameObject); }