Untitled
unknown
csharp
2 years ago
702 B
3
Indexable
public void Update() { PlayerPrefs.SetInt("MusicOff", MusicOff ? 1 : 0); if (MusicOff = PlayerPrefs.GetInt("MusicOff") != 1) { AudioSource[] audios = FindObjectsOfType<AudioSource>(); foreach (AudioSource a in audios) { a.volume = 0; } } if (MusicOff = PlayerPrefs.GetInt("MusicOff") != 0) { AudioSource[] audios = FindObjectsOfType<AudioSource>(); foreach (AudioSource a in audios) { a.volume = 1; } } if (MusicOff) { MusicOff = PlayerPrefs.GetInt("MusicOff") == 1; ...
Editor is loading...