123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class QuestionData
- {
- public List<QuestionInfor> QuestionList = new List<QuestionInfor>();
- public int Score = 0;
- public void Init()
- {
- QuestionInfor question1 = new QuestionInfor();
- question1.position = new Vector3(3.301f, 0f, -5.286f);
- question1.rotation = new Vector3(0, -116.1f, 0f);
- question1.scale = new Vector3(1, 1, 1);
- question1.question = "太阳系中最小的行星是?";
- question1.Answer.Add("水星");
- question1.Answer.Add("木星");
- question1.RightAnswer = 0;
- question1.score = 10;
- QuestionList.Add(question1);
- QuestionInfor question2 = new QuestionInfor();
- question2.position = new Vector3(3.057f, -0f, -4.788f);
- question2.rotation = new Vector3(0, -116.1f, 0f);
- question2.scale = new Vector3(1, 1, 1);
- question2.question = "金星上的一天等于地球的多少天?";
- question2.Answer.Add("245");
- question2.Answer.Add("243");
- question2.RightAnswer = 1;
- question2.score = 10;
- QuestionList.Add(question2);
- QuestionInfor question3 = new QuestionInfor();
- question3.position = new Vector3(2.816f, -0f, -4.296f);
- question3.rotation = new Vector3(0, -116.1f, 0f);
- question3.scale = new Vector3(1, 1, 1);
- question3.question = "太阳系密度最大的天体是?";
- question3.Answer.Add("地球");
- question3.Answer.Add("火星");
- question3.RightAnswer = 0;
- question3.score = 10;
- QuestionList.Add(question3);
- }
- }
- public class QuestionInfor
- {
- public Vector3 position = Vector3.zero;
- public Vector3 rotation = Vector3.zero;
- public Vector3 scale = Vector3.zero;
- public string question = null;
- public List<string> Answer = new List<string>();
- public int RightAnswer = 0;
- public int score = 0;
- }
- public class SendQuestionInfor
- {
- public string sn = "";
- public string cmd = "answer";
- public int correct = 0;
- public int incorrect = 0;
- }
|