public void soundPlay(string audioName, float volume = 1) { ResourceManager.Instance.DownLoadBundle(URLConst.GetSound(audioName), delegate(object obj){ Resource resource = ResourceManager.Instance.GetResource(URLConst.GetSound(audioName)); AudioClip audioClip = resource.AudioClip; soundPlayStart(audioClip, audioName, volume); ResourceManager.Instance.DestoryResource(resource.BundlePath, false, false); }, null, ResourceManager.SOUND_PRIORITY); }
public void bgmPlay(string audioName, float volume = 1, bool isLoop = true) { if (GameConst._bigAudio.ContainsKey(audioName)) { playBigBgm(audioName, volume, isLoop); } else { ResourceManager.Instance.DownLoadBundle(URLConst.GetSound(audioName), delegate(object obj) { Resource resource = ResourceManager.Instance.GetResource(URLConst.GetSound(audioName)); AudioClip audioClip = resource.AudioClip; bgmPlayStart(audioClip, audioName, volume, isLoop); ResourceManager.Instance.DestoryResource(resource.BundlePath, false, true); }, null, ResourceManager.SOUND_PRIORITY); } }