nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
csharp
a year ago
561 B
4
Indexable
Never
  public void Start()
    {
        SaveMusicData();
    }
    public void SaveMusicData()
    {
        PlayerPrefs.SetInt("MusicOff", MusicOff ? 1 : 0);
    }
    public void Update()
    {
        if (MusicOff = PlayerPrefs.GetInt("MusicOff") != 1)
        {
            AudioSource[] audios = FindObjectsOfType<AudioSource>();
            foreach (AudioSource a in audios)
            {
                a.volume = 0;
            }
        }
        
        if (MusicOff)
        {
            MusicOff = PlayerPrefs.GetInt("MusicOff") == 1;
           ....

nord vpnnord vpn
Ad