// Use this for initialization void Start() { volumeSlider.value = PlayerPrefsController.GetMasterVolume(); difficultySlider.value = PlayerPrefsController.GetMasterDifficulty(); DisplayDifficulty(); DisplayVolume(); }
// Start is called before the first frame update void Start() { lives = baseLives - PlayerPrefsController.GetMasterDifficulty(); livesText = GetComponent <Text>(); UpdateDisplay(); //Debug.Log("difficulty setting currently is " + PlayerPrefsController.GetMasterDifficulty()); }
private void SetSpawnDelay() { float difficultyFactor = (PlayerPrefsController.GetMasterDifficulty() * 2); minSpawnDelay -= difficultyFactor; maxSpawnDelay -= difficultyFactor; }
void Start() { currentTime = Mathf.Round(levelTimeInSeconds * PlayerPrefsController.GetMasterDifficulty()); timerImage = GetComponent <Image>(); timerImage.fillAmount = 1.0f; timerText.text = (levelTimeInSeconds.ToString("#") + "s"); }
private void Start() { difficulty = PlayerPrefsController.GetMasterDifficulty(); animator = GetComponent <Animator>(); Debug.Log(gameObject.name + " initial damage: " + damage); damage *= difficulty; Debug.Log(gameObject.name + " difficulty damage: " + damage); }
private void SetHealthForDifficulty() { Debug.Log(PlayerPrefsController.GetMasterDifficulty()); int difficultyFactor = (Mathf.RoundToInt(PlayerPrefsController.GetMasterDifficulty() * 5)); Debug.Log(difficultyFactor); playerHealth -= difficultyFactor; }
// Start is called before the first frame update IEnumerator Start() { numberOfSpawns = PlayerPrefsController.GetMasterDifficulty(); int currentSpawn = 0; do { yield return(StartCoroutine(SpawnEnemy())); currentSpawn++; if (currentSpawn >= numberOfSpawns) { spawn = false; } }while (spawn); }
// Start is called before the first frame update void Start() { volumeOption = transform.Find("Volume/VolumeSlider").gameObject; difficultyOption = transform.Find("Difficulty/DifficultySlider").gameObject; playerPrefController = FindObjectOfType <PlayerPrefsController>(); //populate with saved player prefs float volumePref = playerPrefController.GetMasterVolume(); if (volumeOption.GetComponent <Slider>().value != volumePref) { volumeOption.GetComponent <Slider>().value = volumePref; } float difficultyPref = playerPrefController.GetMasterDifficulty(); if (difficultyOption.GetComponent <Slider>().value != difficultyPref) { difficultyOption.GetComponent <Slider>().value = difficultyPref; } }
public void GameDifficulty() { var gameDifficulty = PlayerPrefsController.GetMasterDifficulty(); Debug.Log("Difficulty set to" + gameDifficulty); //Easy Mode if (gameDifficulty == 0f) { damages = 25; } //Normal Mode else if (gameDifficulty == 1f) { damages = 35; } //Hard Mode else if (gameDifficulty == 2f) { damages = 50; } }
// Start is called before the first frame update void Start() { bool attacker = GetComponent <Attacker>(); bool defender = GetComponent <Defender>(); difficulty = PlayerPrefsController.GetMasterDifficulty(); if (attacker) { Debug.Log(gameObject.name + " orig health set to: " + fullHealth); fullHealth = fullHealth * difficulty; Debug.Log(gameObject.name + " diff health set to: " + fullHealth); } else if (defender) { Debug.Log(gameObject.name + " orig health set to: " + fullHealth); fullHealth = fullHealth / difficulty; Debug.Log(gameObject.name + " diff health set to: " + fullHealth); } currentHealth = fullHealth; Debug.Log(gameObject.name + " level health set to: " + currentHealth); }
//difficulty public void GameDifficulty() { var gameDifficulty = PlayerPrefsController.GetMasterDifficulty(); Debug.Log("Difficulty set to " + gameDifficulty); //easy if (gameDifficulty == 0f) { return; } //normal else if (gameDifficulty == 1f) { health = 100f; HpText.text = health.ToString(); } //hard else if (gameDifficulty == 2f) { health = 50f; HpText.text = health.ToString(); } }
public void AddCoins(int amount) { coins += Mathf.CeilToInt(amount / PlayerPrefsController.GetMasterDifficulty()); UpdateDisplay(); }
private void Start() { playerHealth = baseHealth - PlayerPrefsController.GetMasterDifficulty(); healthText = GetComponent <Text>(); UpdateHealthDisplay(); }
// Start is called before the first frame update void Start() { currentHealth = Mathf.Round(maxHealth / PlayerPrefsController.GetMasterDifficulty()); displayHealth(); }
// Start is called before the first frame update void Start() { hearts -= PlayerPrefsController.GetMasterDifficulty(); heartsText = GetComponent <Text>(); UpdateHeartsToDisplay(); }
private void Start() { SetLevelTimer(PlayerPrefsController.GetMasterDifficulty()); StartCoroutine(StartSpawners()); }
private void Start() { Destroy(gameObject, destroyTime); projectileDamage /= PlayerPrefsController.GetMasterDifficulty(); }
// Start is called before the first frame update void Start() { volumeSlider.value = PlayerPrefsController.GetMasterVolume(); difficultySlider.value = PlayerPrefsController.GetMasterDifficulty(); musicPlayer = FindObjectOfType <MusicPlayer>(); }
private void Start() { levelTime = baseTime + PlayerPrefsController.GetMasterDifficulty() * timeIncFactror; }
private void SetForDifficulty() { int difficultyFactor = Mathf.RoundToInt(PlayerPrefsController.GetMasterDifficulty() * 200); stars -= difficultyFactor; }
void Start() { coins = Mathf.Round(coins / PlayerPrefsController.GetMasterDifficulty()); coinText = GetComponent <Text>(); UpdateDisplay(); }
private void Start() { lives = baseLives - PlayerPrefsController.GetMasterDifficulty(); livesText = GetComponent <Text>(); UpdateDisplay(); }
void Start() { life = Mathf.RoundToInt(life / PlayerPrefsController.GetMasterDifficulty()); lifeText = GetComponent <Text>(); UpdateDisplay(); }
void Start() { score = Mathf.Round(score / PlayerPrefsController.GetMasterDifficulty()); scoreText = FindObjectOfType <ScoreBoard>().GetComponent <Text>(); UpdateScore(); }