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); } }
// Start is called before the first frame update void Start() { volumeSlider.value = PlayerRefController.GetGameVolume(); difficultySlider.value = PlayerRefController.GetGameDifficulty(); }
public void SaveAndExit() { PlayerRefController.SetGameVolume(volumeSlider.value); PlayerRefController.SetGameDifficulty(difficultySlider.value); FindObjectOfType <LevelLoader>().BackToMainMenu(); }
// Start is called before the first frame update void Start() { audioSource = GetComponent <AudioSource>(); audioSource.volume = PlayerRefController.GetGameVolume(); }