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.

27 lines
625 B

2 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Question : MonoBehaviour
{
public int index;//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>Ĵ𰸼<C4B4>¼
int rand;//<2F><><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>
public string[] questionInfo;
Toggle tg;
void Start()
{
tg = GetComponent<Toggle>();
rand = Step2_3.rand;
transform.GetChild(1).GetComponent<Text>().text = questionInfo[rand];
tg.onValueChanged.AddListener((bool value) =>
{
if (value)
{
EventManager.Instance.emit("Question", index);
}
});
}
}