예제 #1
0
 public void UpdateAudio()
 {
     AudioSource[] audiosources = FindObjectsOfType <AudioSource>();
     foreach (AudioSource audioSource in audiosources)
     {
         audioSource.volume = PlayerPrefController.GetMasterVolume();
     }
 }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     if (SettingsMenu)
     {
         volumeSlider.value     = PlayerPrefController.GetMasterVolume();
         difficultySlider.value = PlayerPrefController.GetDifficulty();
     }
     musicConfigurator = FindObjectOfType <MusicConfigurator>();
 }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value    = PlayerPrefController.GetMasterVolume();
     diffulctySlider.value = PlayerPrefController.GetDifficulty();
 }
예제 #4
0
    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;
    }
예제 #5
0
 private void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefController.GetMasterVolume();
 }