public void UpdateAudio() { AudioSource[] audiosources = FindObjectsOfType <AudioSource>(); foreach (AudioSource audioSource in audiosources) { audioSource.volume = PlayerPrefController.GetMasterVolume(); } }
// Start is called before the first frame update void Start() { if (SettingsMenu) { volumeSlider.value = PlayerPrefController.GetMasterVolume(); difficultySlider.value = PlayerPrefController.GetDifficulty(); } musicConfigurator = FindObjectOfType <MusicConfigurator>(); }
// Start is called before the first frame update void Start() { volumeSlider.value = PlayerPrefController.GetMasterVolume(); diffulctySlider.value = PlayerPrefController.GetDifficulty(); }
private void Start() { if (bulletType == BulletType.enemy) { direction = Vector2.left; } else { direction = Vector2.right; } if (shotsfx) { AudioSource.PlayClipAtPoint(shotsfx, Camera.main.transform.position, PlayerPrefController.GetMasterVolume()); } CreateBulletParent(); gameObject.transform.parent = bulletParent.transform; }
private void Start() { DontDestroyOnLoad(this); audioSource = GetComponent <AudioSource>(); audioSource.volume = PlayerPrefController.GetMasterVolume(); }