Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        volumeSlider.value = PlayerSettings.GetMasterVolume();
        musicPlayer        = FindObjectOfType <MusicPlayer>();

        difficultySlider.value = PlayerSettings.GetDifficulty();
    }
    // Use this for initialization
    void Start()
    {
        defenderParent = GameObject.Find(DEFENDER_PARENT_NAME);
        if (!defenderParent)
        {
            defenderParent = new GameObject(DEFENDER_PARENT_NAME);
        }

        difficulty = PlayerSettings.GetDifficulty();
    }
Esempio n. 3
0
    private void LabelButtonWithCost()
    {
        Text costText = GetComponentInChildren <Text>();

        if (!costText)
        {
            Debug.LogError(name + "Has not cost text!");
            return;
        }

        int cost = defenderPrefab.StarCost;

        if (PlayerSettings.GetDifficulty() == 0)
        {
            cost /= 2;
        }
        else if (PlayerSettings.GetDifficulty() == 2)
        {
            cost *= 2;
        }


        costText.text = cost.ToString();
    }
Esempio n. 4
0
 // Use this for initialization
 void Start()
 {
     livesText  = GetComponent <Text>();
     numOfLives = baseLifes - PlayerSettings.GetDifficulty();
     UpdateDisplay();
 }