Example #1
0
    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);
    }
Example #2
0
 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);
     }
 }
Example #3
0
    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);
        }
    }
Example #4
0
 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);
 }