Example #1
0
    void SaveValuesAndLoad()
    {
        //sets the default
        if (string.IsNullOrEmpty(weeklyCheck))
        {
            //if this is the serious check default is yes..otherwise it can stay as empty string
            if (ToCheckOrNotToCheck() == 1)
            {
                weeklyCheck = OptionCodes.options[0];
            }
        }

        //sets the results to playerprefs
        vM.SaveWeeklyCheck(weeklyCheck, currentWeekIndex - ShouldSaveToPreviousWeek());

        if (ShouldSaveToPreviousWeek() == 1)
        {
            FindObjectOfType <SceneLoader>().LoadNextScene();
        }
        else
        {
            FindObjectOfType <SceneLoader>().LoadSceneByName("Check");
        }
    }