MathQuestionSO.cs 642 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. using System.Collections.Generic;
  3. [CreateAssetMenu(fileName = "NewMathQuestion", menuName = "MathGame/MathQuestion")]
  4. public class MathQuestionSO : ScriptableObject
  5. {
  6. [Header("题目信息")]
  7. [TextArea(2, 4)]
  8. public string questionText; // 题目文本,例如:"5 + 3 = ?"
  9. [Header("答案")]
  10. public int correctAnswer; // 正确答案
  11. [Header("错误答案")]
  12. public List<int> wrongAnswers = new List<int>(); // 3个错误答案
  13. [Header("难度")]
  14. [Range(1, 3)]
  15. public int difficulty = 1; // 难度:1简单,2中等,3困难
  16. }