public void CreateLevels(LevelSet set)
    {
        curSet       = set;
        title.text   = set.SetFullName;
        title.color  = FugoUtils.HexToColor(set.TitleColor);
        ribbon.color = FugoUtils.HexToColor(set.RibbonColor);
        bg.sprite    = Resources.Load <Sprite>("BGImages/" + set.bgImage);
        FugoUtils.ChangeAlpha(ribbon, 0f);
        FugoUtils.ChangeAlpha(title, 0f);
        FugoUtils.ChangeAlpha(levelsBG.GetComponent <Image>(), 0f);
        FugoUtils.ChangeAlpha(bg, 0f);
        bigLevel.localScale = Vector3.zero;
        List <int> hiddenLevelsInSet = FugoUtils.GetHiddenLevelsInSet(set);

        CreateEmptyLevels(hiddenLevelsInSet);
        IEnumerator enumerator = levelHolder.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                Transform level = (Transform)enumerator.Current;
                SetHiddenSetProperties(level, "locked", set);
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
        int hiddenLevel = PlayerPrefsManager.GetHiddenLevel(int.Parse(set.SetID));
        int num         = 0;

        for (int i = 0; i < hiddenLevelsInSet.Count; i++)
        {
            num += hiddenLevelsInSet[i];
            if (num >= hiddenLevel)
            {
                currentSet = levelHolder.GetChild(i);
                break;
            }
        }
        int         num2        = 0;
        int         num3        = 1;
        IEnumerator enumerator2 = levelHolder.GetEnumerator();

        try
        {
            while (enumerator2.MoveNext())
            {
                Transform transform = (Transform)enumerator2.Current;
                if (transform == currentSet)
                {
                    SetHiddenSetProperties(transform, "current", set);
                    CreateEmptyBigStars(bigLevel, currentSet.Find("StarHolder").childCount);
                    bigLevel.Find("LevelText").GetComponent <Text>().text = currentSet.Find("LevelText").GetComponent <Text>().text;
                    StartCoroutine(AnimateCurrentLevel(transform, 0.5f));
                    break;
                }
                num3 += hiddenLevelsInSet[num2];
                SetHiddenSetProperties(transform, "completed", set);
                num2++;
            }
        }
        finally
        {
            IDisposable disposable2;
            if ((disposable2 = (enumerator2 as IDisposable)) != null)
            {
                disposable2.Dispose();
            }
        }
        PaintAllChilds(bigLevel.Find("StarHolder"), FugoUtils.HexToColor(set.NotCompletedLevelBGColor));
        bigLevel.Find("LevelText").GetComponent <Text>().color = FugoUtils.HexToColor(set.SelectedLevelNumberColor);
        bigLevel.GetComponent <Image>().color = FugoUtils.HexToColor(set.SelectedLevelBGColor);
        curLevelInGame = hiddenLevel - num3 + 1;
        for (int j = 0; j < hiddenLevel - num3; j++)
        {
            if (bigLevel.Find("StarHolder").childCount > j)
            {
                bigLevel.Find("StarHolder").GetChild(j).GetComponent <Image>()
                .color = FugoUtils.HexToColor(set.CompletedLevelBGColor);
            }
        }
        panel.gameObject.SetActive(value: true);
        StartCoroutine(AnimateSetScreen());
        if (currentSet == null)
        {
            CreateEmptyBigStars(bigLevel, hiddenLevelsInSet[hiddenLevelsInSet.Count - 1]);
            bigLevel.Find("LevelText").GetComponent <Text>().text = hiddenLevelsInSet.Count.ToString();
            PaintAllChilds(bigLevel.Find("StarHolder"), FugoUtils.HexToColor(set.CompletedLevelBGColor));
        }
    }