예제 #1
0
        private void playAudio(string key, params IPlayOption[] options)
        {
            if (!_cueAcb.Exists(key))
            {
#if DEBUG
                UnityEngine.Debug.Log("Cue Not Found! :" + key);
#endif
                return;
            }

            var source = _sourcePool.Rent();
            source.cueSheet = _cueSheetName;
            source.cueName  = key;

            foreach (var option in options)
            {
                option.ApplySetting(source);
            }

            source.Play();

            _activeSources.Add(source);
        }
예제 #2
0
 public T Rent()
 {
     return(objectPool.Rent().Behaviour as T);
 }