Пример #1
0
 private void Awake()
 {
     if (PlayerRefController.GetGameDifficulty() == 1f)
     {
         return;
     }
     else if (PlayerRefController.GetGameDifficulty() == 2f)
     {
         GetComponent <Health>().SetMaxHealth(5f);
     }
     else if (PlayerRefController.GetGameDifficulty() == 3f)
     {
         GetComponent <Health>().SetMaxHealth(1f);
     }
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value     = PlayerRefController.GetGameVolume();
     difficultySlider.value = PlayerRefController.GetGameDifficulty();
 }
Пример #3
0
 public void SaveAndExit()
 {
     PlayerRefController.SetGameVolume(volumeSlider.value);
     PlayerRefController.SetGameDifficulty(difficultySlider.value);
     FindObjectOfType <LevelLoader>().BackToMainMenu();
 }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerRefController.GetGameVolume();
 }