using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StartUpSetting : MonoBehaviour
{
[SerializeField] private GameObject audioSource;
void Start()
{
if (PlayerPrefs.HasKey("Mute"))
{
PlayerPrefs.SetInt("Mute", 0);
}
if (PlayerPrefs.GetInt("Mute") == 0)
{
audioSource.SetActive(true);
}
else
{
audioSource.SetActive(false);
}
}
public void Mute()
{
PlayerPrefs.SetInt("Mute", 1);
}
public void UnMute()
{
PlayerPrefs.SetInt("Mute", 0);
}
}