Exemple #1
0
    public void StartChapterIntro(int cNum, int lNum)
    {
        Debug.Log(TAG + "showing the chapter intro.");
        chapterNum          = cNum;
        levelNum            = lNum;
        textChapterNum.text = "Chapter " + (chapterNum + 1).ToString();

        ChapterManager.ChapterRef chapter = chapterManager.GetChapters()[chapterNum];
        textChapterName.text = chapter.GetName();
        ToGamePlay();
        textChapterIntro.SetActive(true);
        chapterIntro = true;
        timer        = 3.5f;
        int chapterSound = chapter.GetStartSound();

        soundManager.PlayUISound(chapterSound, 0.8f);
    }
Exemple #2
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();
    }