コード例 #1
0
    private void UpdateQuestionDataBases()
    {
        QuestionDataBases.Clear();
        for (var index = 0; index < QuestionDataBaseNames.Count; index++)
        {
            string           questionDataBaseName = QuestionDataBaseNames[index];
            QuestionDataBase newBase = new QuestionDataBase();
            newBase.Name      = questionDataBaseName;
            newBase.Path      = PlayerPrefsManager.GetQuestionDataBasePath(index);
            newBase.TimeSpent = PlayerPrefsManager.GetQuestionDataBaseTimeSpent(index);
            newBase.Questions = LocalDataManager.GetQuestionsFromFolder(newBase.Path);
            foreach (Question question in newBase.Questions)
            {
                question.IsAnswered = PlayerPrefsManager.GetQuestionState(index, question);
            }

            QuestionDataBases.Add(newBase);
        }
    }