You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.0 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
namespace Level2
{
public class Question
{
public string title;
public string[] content;
public int answer;
public Question(string title, string[] content, int answer)
{
this.title = title;
this.content = content;
this.answer = answer;
}
}
public class Select {
public int[] show;
public int answer;
public Select(int[] show,int answer){
this.show = show;
this.answer = answer;
}
}
[DefaultExecutionOrder(-6)]
public class DataManager : MonoBehaviour
{
[NonSerialized]
public List<Question> questionData = new List<Question>();
[NonSerialized]
public List<string> dialogues = new List<string>();
[NonSerialized]
public List<Select> selectData = new List<Select>();
private void Awake()
{
questionData.Add(new Question("2.判断被救者有无反应,施救者需双手轻拍被救者",
new string[4] { "头部", "胸部", "肩部", "手部" }, 2));
questionData.Add(new Question("3.检查被救者呼吸是否正常,施救者需观察被救者",
new string[4] { "头部", "胸部", "肩部", "腹部" }, 1));
questionData.Add(new Question("4.施救者判断被救者无意识、无呼吸后,需要立即进行以下操作",
new string[4] { "请人拨打120", "请人去取AED", "实施胸外按压和人工呼吸", "以上选项都需要" }, 3));
dialogues.Add("接下来进行判断呼救");
dialogues.Add("操作错误,请重试");
dialogues.Add("确认被救者无呼吸无意识,请前往下一关");
selectData.Add(new Select(new int[4] { 0, 1, 2, 4 }, 2));
selectData.Add(new Select(new int[4] { 0, 1, 2, 3 }, 1));
}
}
}