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.
36 lines
807 B
36 lines
807 B
3 years ago
|
using UnityEngine;
|
||
|
using System.Collections;
|
||
|
using UnityEngine.UI;
|
||
|
using AX.MessageSystem;
|
||
|
|
||
|
public class AllQuestonSelectMessage : MonoBehaviour {
|
||
|
|
||
|
public QuestionInfo question;
|
||
|
void Start()
|
||
|
{
|
||
|
GetComponent<Toggle>().onValueChanged.AddListener(changeList);
|
||
|
}
|
||
|
void OnDestroy()
|
||
|
{
|
||
|
GetComponent<Toggle>().onValueChanged.RemoveListener(changeList);
|
||
|
}
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
public void setQuestion(QuestionInfo question)
|
||
|
{
|
||
|
this.question = question;
|
||
|
transform.Find("QuestionName").GetComponent<Text>().text = question.Name;
|
||
|
}
|
||
|
private void changeList(bool selected)
|
||
|
{
|
||
|
if (selected)
|
||
|
{
|
||
|
AllQuestionSelect.question = question;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|