public void Play(string nodeId, string resourcePath, bool loop = false) { FageAudioNode node = FageAudioNode.Find(nodeId); FageAudioSourceControl audioSourceControl = (_hashtable[node] as FageAudioPooler).GetFreeAudioSourceControl(); audioSourceControl.Play(CachedResource.Load <AudioClip>(resourcePath), loop, node.GetVolume(), false); }
public void Play(string nodeId, string clip, ref FageAudioSourceControl audioSourceControl, bool loop = false) { FageAudioXML audioXML = _audioRoot.Find (nodeId); AudioClip ac = FageBundleLoader.Instance.Load (clip) as AudioClip; if (ac != null) { audioSourceControl = audioXML.GetControl (); audioSourceControl.Play (ac, loop, audioXML.GetVolume(), true); } }
public void Play(string nodeId, string clip, ref FageAudioSourceControl audioSourceControl, bool loop = false) { FageAudioXML audioXML = _audioRoot.Find(nodeId); AudioClip ac = FageBundleLoader.Instance.Load(clip) as AudioClip; if (ac != null) { audioSourceControl = audioXML.GetControl(); audioSourceControl.Play(ac, loop, audioXML.GetVolume(), true); } }
public void Play(string nodeId, string resourcePath, ref FageAudioSourceControl audioSourceControl, bool loop = false) { FageAudioNode node = FageAudioNode.Find(nodeId); audioSourceControl = (_hashtable[node] as FageAudioPooler).GetFreeAudioSourceControl(); audioSourceControl.Play(CachedResource.Load<AudioClip>(resourcePath), loop, node.GetVolume(), true); }