private void Awake() { damage = baseDamage * PlayerPrefsController.GetGameDifficulty(); if (FindObjectOfType <LevelController>() == null) { return; } FindObjectOfType <LevelController>().EnemySpawned(); }
//Increases Enemy health based on game difficulty. Defenders are not affected private void Awake() { if (GetComponent <Enemy>() != null) { characterHealth = baseHealth * PlayerPrefsController.GetGameDifficulty(); } else { characterHealth = baseHealth; } }
void Start() { volumeSlider.value = PlayerPrefsController.GetMasterVolume(); difficultySlider.value = PlayerPrefsController.GetGameDifficulty(); musicPlayer = FindObjectOfType <MusicPlayer>(); }
// Start is called before the first frame update void Start() { lives = baseLives - PlayerPrefsController.GetGameDifficulty() * 2; livesText = GetComponent <Text>(); UpdateDisplay(); }
// Start is called before the first frame update void Start() { volumeSlider.value = PlayerPrefsController.GetGameVolume(); difficultySlider.value = PlayerPrefsController.GetGameDifficulty(); }