using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(AudioSource))]
public class SoundManager : MonoBehaviour
{
    public static SoundManager instance;

    private bool muted;
    private AudioSource audioSource;

    public void Awake()
    {
        if (instance == null) { instance = this; }
        else { Destroy(gameObject); }

        DontDestroyOnLoad(gameObject);

        audioSource = GetComponent<AudioSource>();
    }

    public void ToogleMuted()
    {
        muted = !muted;
        audioSource.mute = muted;
    }
    public bool GetMuted()
    {
        return muted;
    }

    void Start()
    {

    }

    void Update()
    {
        
    }
}
