using UnityEngine;
using UnityEngine.Audio; 
using UnityEngine.UI; 

public class AudioController : MonoBehaviour
{
    [SerializeField] private AudioMixer myMixer; 

    
    public void SetMusicVolume(float sliderValue)
    {
       
        float volume = Mathf.Log10(sliderValue) * 20;
        myMixer.SetFloat("mixerMusic", volume);
    }
    public void SetMasterVolume(float sliderValue)
    {

        float volume = Mathf.Log10(sliderValue) * 20;
        myMixer.SetFloat("mixerMaster", volume);
    }
    public void SetSfxVolume(float sliderValue)
    {

        float volume = Mathf.Log10(sliderValue) * 20;
        myMixer.SetFloat("mixerSfx", volume);
    }
}
