Exemplo n.º 1
0
    void SetLevel(int lvl)
    {
        var level = _isTesting ? _testLevelNum : lvl;

        if (level < _levelsConfig.LevelConfigs.Count)
        {
            _patterns = _levelsConfig.LevelConfigs[level].TextAssets;
        }
        else // if levels ended
        {
            SpawnRandomLevel(lvl);
        }

        _levelSpawner.SetLevel(_patterns, OnLevelCompleated);
    }