Beispiel #1
0
    public void SetUp(ChapterManager chapterManager)
    {
        Debug.Log(TAG + "setting up");
        ChapterManager.ChapterRef[] chapters = chapterManager.GetChapters();
        levelFolder = new LevelCon[chapters.Length];

        for (int i = 0; i < chapters.Length; i++)
        {
            ChapterManager.ChapterRef chapter = chapters[i];
            string folder = chapter.GetFolder();
            levelFolder[i] = new LevelCon(LoadCurLevels(folder));
        }


        if (!Directory.Exists(Application.persistentDataPath + "/CustomChapters"))
        {
            Debug.Log(TAG + "no folder found, creating now...");
            Directory.CreateDirectory(Application.persistentDataPath + "/CustomChapters");
            //there will be no levels so just return
            //return;
        }
        //posibly don't have to load custom chapters until needed
        //LoadAllCustomChapters();
    }