Exemplo n.º 1
0
    private void ToggleLevelSelectOverride()
    {
        LevelNavigator navigator = FindObjectOfType <LevelNavigator>();

        // If the navigator exists then toggle its override
        if (navigator)
        {
            LevelID maxID = new LevelID(LevelDataLoader.MaxLevel() + 1, 1);
            navigator.ToggleOverride(maxID);
        }
    }
Exemplo n.º 2
0
    public void Start()
    {
        // Create a level select UI for every level
        int maxLevel = LevelDataLoader.MaxLevel();

        uis = new LevelSelectUI[maxLevel + 1];

        for (int level = 0; level <= maxLevel; level++)
        {
            uis[level] = Instantiate(levelUIPrefab, levelUIGroup.transform);
            uis[level].Setup(level);
        }
    }