private void Start() { m_AudioSource = GetComponent <AudioSource>(); if (CPlayerPrefsManager.HasAnyPreferences()) { m_AudioSource.volume = CPlayerPrefsManager.GetMasterVolume(); } SceneManager.sceneLoaded += OnSceneLoaded; }
private void Start() { m_LevelManager = FindObjectOfType <CLevelManager>(); m_MusicManager = FindObjectOfType <CMusicManager>(); if (CPlayerPrefsManager.HasAnyPreferences()) { VolumeSlider.value = CPlayerPrefsManager.GetMasterVolume(); DifficultySlider.value = CPlayerPrefsManager.GetDifficulty(); } else { SetDefaults(); } }
public void SaveAndExit() { CPlayerPrefsManager.SetMasterVolume(VolumeSlider.value); CPlayerPrefsManager.SetDifficulty(DifficultySlider.value); m_LevelManager.LoadLevel("01a Start"); }