private void Start() { if (AudioDataService.HasMusicOn()) { musicAudioSource.Play(); } if (PlayerStatusService.HasPlayerDataFile()) { scenesManager.LoadMainMenu(); } else { englishBtn.SetActive(true); portugueseBtn.SetActive(true); } }
public void ChangeMusic() { var musicAudioSource = audioSourcesManager.GetMainMusic(); if (AudioDataService.HasMusicOn()) { ChangeButton(musicBtn, true); AudioDataService.SetMusic(false); } else { ChangeButton(musicBtn, false); AudioDataService.SetMusic(true); } AudioDataService.CheckMusicOn(new[] { musicAudioSource }); selectAudioSource.Play(); if (AudioDataService.HasMusicOn()) { musicAudioSource.Play(); } }
private void Start() { ChangeButton(musicBtn, !AudioDataService.HasMusicOn()); ChangeButton(sfxBtn, !AudioDataService.HasSfxOn()); }