30 lines
834 B
C#
30 lines
834 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
/*******************************************************************************
|
|
*Create By CG
|
|
*Function
|
|
*******************************************************************************/
|
|
namespace ZXK.ZWQG
|
|
{
|
|
public class QuestionBtnCtrl : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private ThemeCtrl _mainThemeCtrl = null;
|
|
[SerializeField]
|
|
private string _rightAnswer;
|
|
|
|
private void Awake()
|
|
{
|
|
transform.GetComponent<Button>().onClick.AddListener(() =>
|
|
{
|
|
_mainThemeCtrl.SelectQuestion(_rightAnswer,this);
|
|
});
|
|
}
|
|
public void SetRightTxt()
|
|
{
|
|
transform.Find("Text (Legacy)").GetComponent<Text>().text = _rightAnswer;
|
|
}
|
|
}
|
|
} |