Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 public void Play(AudioClip clip, bool isLoop = false, int volumn = 1)
 {
     AudioChanel.GetChanel().Play(clip, isLoop, volumn);
 }