Beispiel #1
0
    public override void OnOpen(string[] agruments = null, System.Action onCloseComplete = null)
    {
        InvokeRepeating("SetBoostEXP", 0, 1);

        levelIndex           = int.Parse(agruments [0]);
        levelTitleLabel.text = "Level " + levelIndex;
        bgLevel.mainTexture  = Resources.Load <Texture2D> ("Textures/UI/Dialog/LevelSelect/" + BackgroundController.GetBackgroundIndex(levelIndex));
        if (Master.LevelData.lastLevel >= Master.LevelData.totalLevel)
        {
            isUnlockHardMode = true;
            if ((Master.LevelData.lastLevelHard + 1) >= levelIndex)
            {
                isUnlockHardModePreLevel = true;
            }
        }
        SetListUnits();
        SetListEnemies();
        SetStars();

        Master.GetChildByName(gameObject, "HardLockIcon").SetActive(!(isUnlockHardMode && isUnlockHardModePreLevel));
    }