示例#1
0
    public void updateGoals() //toplanan parcalarin bolumun bitirme gereksinimlerini karsilayip karsilamadiginin kontrolu
    {
        int goalsCompleted = 0;

        for (int i = 0; i < levelGoals.Length; i++)
        {
            currentGoals[i].thisText.text = "" + levelGoals[i].numberCollected + "/" + levelGoals[i].numberNeed;
            if (levelGoals[i].numberCollected >= levelGoals[i].numberNeed)
            {
                goalsCompleted++;
                currentGoals[i].thisText.text = "" + levelGoals[i].numberNeed + "/" + levelGoals[i].numberNeed;
            }
        }
        if (goalsCompleted >= levelGoals.Length)
        {
            if (end != null)
            {
                end.Lwin = true;
                StartCoroutine(end.LevelComplete());
            }
        }
    }