56 lines
1.1 KiB
C#
56 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class TaskDataBase : MonoBehaviour
|
|
{
|
|
//数据索引 名称
|
|
public string taskDataKye;
|
|
|
|
//数据值
|
|
public string taskDataValue;
|
|
|
|
//是否 用户可以输入
|
|
public bool isInputData;
|
|
// Start is called before the first frame update
|
|
protected virtual void Start()
|
|
{
|
|
taskDataKye = transform.name;
|
|
if (!isInputData)
|
|
{
|
|
for (int i = 0; i < transform.childCount; i++)
|
|
{
|
|
if (transform.GetChild(i).GetComponent<Selectable>())
|
|
{
|
|
transform.GetChild(i).GetComponent<Selectable>().interactable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
//获取 当前名称数据
|
|
public virtual void GetData()
|
|
{
|
|
|
|
}
|
|
|
|
// 将数据设置到文本中
|
|
public virtual void SetData()
|
|
{
|
|
|
|
}
|
|
|
|
//检查答案
|
|
public virtual void CheckAnswer()
|
|
{
|
|
|
|
}
|
|
}
|