Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        levelManager = GameObject.Find("LevelManager").GetComponent <LevelManager>();
        levelTimer   = GameObject.Find("LevelTimer").GetComponent <LevelTimer>();

        int lastCompletedLevel = levelManager.completedLevelList[levelManager.completedLevelList.Count - 1].levelUnlocked;

        Debug.Log("Last completed level = " + lastCompletedLevel + ", This level = " + levelNumber);

        if (lastCompletedLevel == levelNumber)
        {
            levelTimer.DestroyVisableTimer();
        }
    }