Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
    // 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);
        }
    }