浏览代码

Parenting of the default sound pool to the AudioManager

/main
Ciro Continisio 4 年前
当前提交
1fd9ed89
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 7
      UOP1_Project/Assets/Scripts/Audio/AudioManager.cs

7
UOP1_Project/Assets/Scripts/Audio/AudioManager.cs


public class AudioManager : MonoBehaviour
{
[Header("SoundEmitters pool")]
[SerializeField] private SoundEmitterFactorySO _factory;
[SerializeField] private SoundEmitterPoolSO _pool;
[SerializeField] private SoundEmitterFactorySO _factory = default;
[SerializeField] private SoundEmitterPoolSO _pool = default;
[SerializeField] private int _initialSize = 10;
[Header("Listening on channels")]

[Header("Audio control")]
[SerializeField] private AudioMixer audioMixer;
[SerializeField] private AudioMixer audioMixer = default;
[Range(0f, 1f)]
[SerializeField] private float _masterVolume = 1f;
[Range(0f, 1f)]

_musicEventChannel.OnAudioCueRequested += PlayAudioCue; //TODO: Treat music requests differently?
_pool.Prewarm(_initialSize);
_pool.SetParent(this.transform);
}
/// <summary>

正在加载...
取消
保存