void Start() { volumeSlider.value = PlayerPrefsController.GetMasterVolume(); if (PlayerPrefsController.GetRainToggle() == 1) { rainToggle.isOn = true; } else { rainToggle.isOn = false; } if (PlayerPrefsController.GetEasyToggle() == 1) { easyMode.isOn = true; } else { easyMode.isOn = false; } //Rain Effect if (PlayerPrefsController.GetRainToggle() == 1) { //Random menu Rain //rain.SetActive(Random.Range(0, 2) == 1); rain.SetActive(true); } else { rain.SetActive(false); } }
public void BirdDied() { gameOverText.SetActive(true); highScoreObj.SetActive(true); if (score > PlayerPrefsController.GetHighScore() && PlayerPrefsController.GetEasyToggle() == 0) { PlayerPrefsController.SetHighScore(score); highScoreText.text = "High Score : " + score.ToString(); } else { highScoreText.text = "High Score : " + PlayerPrefsController.GetHighScore().ToString(); } StartCoroutine(DeathDelay(0.2f)); }
// Start is called before the first frame update void Start() { if (PlayerPrefsController.GetEasyToggle() == 1) { columnPrefab = columnPrefabEasy; } else { columnPrefab = columnPrefabNormal; } columns = new GameObject[columnPoolSize]; for (int i = 0; i < columnPoolSize; i++) { columns[i] = GameObject.Instantiate(columnPrefab, objectPoolPosition, Quaternion.identity); } }