// Start is called before the first frame update IEnumerator Start() { float difficulty = PlayerPrefsController.GetDifficultyValue(); minSpawnDelay = minSpawnDelay - minSpawnDelay * difficulty / 5f; maxSpawnDelay = maxSpawnDelay - maxSpawnDelay * difficulty / 5f; while (spawn) { yield return(new WaitForSeconds(Random.Range(minSpawnDelay, maxSpawnDelay))); SpawnAttackers(); } }
// Start is called before the first frame update void Start() { volumeSlider.value = PlayerPrefsController.GetMasterVolume(); difficultySlider.value = PlayerPrefsController.GetDifficultyValue(); }