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.

29 lines
674 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Question2 : 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>();
Debug.Log("<22><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>г<EFBFBD>ʼ<EFBFBD><CABC>");
rand = Step2_3.rand;
transform.GetChild(1).GetComponent<Text>().text = questionInfo[rand];
tg.onValueChanged.AddListener((bool value) =>
{
if (value)
{
EventManager.Instance.emit("Question2", index);
}
});
}
}