Beispiel #1
0
    public void StartGame(int chapterNum, int levelNum, bool isCustom)
    {
        Debug.Log(TAG + "starting game.");
        ClearGame();

        //levelManager.GetLevels()[i];
        Level level = levelManager.GetLevel(chapterNum, levelNum, isCustom);      //sets cur level and folder as well

        gridManager.CreateGrid(level, editMode);
        menuManager.ToGamePlay();
        int numOfTools = toolManager.SetUp(level);

        tutorialManager.CheckTutorial(level, numOfTools);

        //soundManager.SetCurChord(0);
        soundManager.SetStartChord(numOfTools);
        soundManager.CheckLastLevel(levelManager, chapterNum, level, isCustom);     //checks if should play credits music

        if (ProgressManager.GetDebug())
        {
            debugManager.SetUp(level.GetFileName(), chapterNum, levelNum);
        }
        if (chapterNum == 0 && levelNum == 0)
        {
            //is the first level of first chapter
            //show some arrows
            GameObject g = Instantiate(pointersPrefab);
            tutorialPointers = g.GetComponent <TutorialPointers>();
            return;
        }
        //if it is not the first level
        if (tutorialPointers != null)
        {
            tutorialPointers.End();
        }
    }