24 lines
543 B
C#
24 lines
543 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
using UnityEngine.UI;
|
|
|
|
public class Dialogue : MonoBehaviour
|
|
{
|
|
[SerializeField] Text text;
|
|
[SerializeField] Button Btn;
|
|
// Start is called before the first frame update
|
|
|
|
public void init(string str)
|
|
{
|
|
text.text= str;
|
|
Btn.onClick.AddListener(()=>
|
|
{
|
|
if (text.text == "ÄãºÃ")
|
|
GameManager.Instance.isGanTanHaoHide = true;
|
|
gameObject.SetActive(false);
|
|
});
|
|
}
|
|
}
|