public void SetValue(AudioChanel chanel, float value) { float decibels = customlowestDecibels + (customlowestDecibels * -value); if (value == 0) { decibels = LOWEST_DECIBELS; } switch (chanel) { case AudioChanel.Master: audioMixer.SetFloat(MASTER_CHANNEL, decibels); break; case AudioChanel.Music: audioMixer.SetFloat(MUSIC_CHANNEL, decibels); break; } }
public void Play(AudioClip clip, bool isLoop = false, int volumn = 1) { AudioChanel.GetChanel().Play(clip, isLoop, volumn); }