Пример #1
0
 private void Awake()
 {
     damage = baseDamage * PlayerPrefsController.GetGameDifficulty();
     if (FindObjectOfType <LevelController>() == null)
     {
         return;
     }
     FindObjectOfType <LevelController>().EnemySpawned();
 }
Пример #2
0
 //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>();
 }
Пример #4
0
 // Start is called before the first frame update
 void Start()
 {
     lives     = baseLives - PlayerPrefsController.GetGameDifficulty() * 2;
     livesText = GetComponent <Text>();
     UpdateDisplay();
 }
Пример #5
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetGameVolume();
     difficultySlider.value = PlayerPrefsController.GetGameDifficulty();
 }