Example #1
0
    //finds the next empty slot and prepares the dM and vM and runs Intro
    public void StartNewRun()
    {
        var listOfEmpty  = GetListOfEmptyRuns();
        var listOfActive = GetListOfActiveRuns();

        if (listOfEmpty.Count == 0)
        {
            FindObjectOfType <PopupManagement>().EnablePopup(noEmptyPopup);
            return;
        }

        //choose the first empty index
        int index = listOfEmpty[0];

        //will only set the curDayIndex and curWeekIndex to 0 for the Intro scenes
        dM.SetIndexes(index);

        //will be empty now
        vM.SetRunIndexForIntro(index);

        if (index == 0)
        {
            sL.LoadSceneByName("Intro");
        }
        else
        {
            sL.LoadSceneByName("Intro Again");
        }

        return;
    }