using UnityEngine;
using System.Collections.Generic;
namespace SK.Framework
{
///
/// 问题配置文件
///
[CreateAssetMenu(fileName = "New Questions Profile", menuName = "Question Profile")]
public sealed class QuestionsProfile : ScriptableObject
{
///
/// 判断题列表
///
public List Judges = new List(0);
///
/// 单向选择题列表
///
public List SingleChoices = new List(0);
///
/// 多项选择题列表
///
public List MultipleChoices = new List(0);
///
/// 填空题列表
///
public List Completions = new List(0);
///
/// 论述题列表
///
public List Essays = new List();
public QuestionBase Get(int sequence)
{
JudgeQuestion judge = Judges.Find(m => m.Sequence == sequence);
if (judge != null) return judge;
SingleChoiceQuestion single = SingleChoices.Find(m => m.Sequence == sequence);
if (single != null) return single;
MultipleChoiceQuestion multiple = MultipleChoices.Find(m => m.Sequence == sequence);
if (multiple != null) return multiple;
CompletionQuestion completion = Completions.Find(m => m.Sequence == sequence);
if (completion != null) return completion;
EssayQuestion essay = Essays.Find(m => m.Sequence == sequence);
if (essay != null) return essay;
return null;
}
}
}