_xiaofang/xiaofang/Assets/Script/UI/PanelUI/WarningPopPanel.cs

36 lines
756 B
C#
Raw Normal View History

2024-12-25 17:07:27 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WarningPopPanel : MonoBehaviour
{
[Header("<22>ر<EFBFBD>")]
public Button closeBtn;
[Header("<22><>ʾ<EFBFBD>ı<EFBFBD>")]
public Text showText;
// Start is called before the first frame update
void Start()
{
closeBtn.onClick.AddListener(() => { ClosePanel(); });
}
// Update is called once per frame
void Update()
{
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public void OpenPanel(string needText)
{
transform.gameObject.SetActive(true);
showText.text = needText;
}
//<2F>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD>
public void ClosePanel()
{
showText.text = "";
transform.gameObject.SetActive(false);
}
}