Cute_demon_attacks/meng_yao/Assets/script/ui/minbtn.cs
2024-10-25 19:14:25 +08:00

38 lines
705 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class minbtn : MonoBehaviour
{
private Button btn;
public GameObject needPanel;
// Start is called before the first frame update
void Start()
{
btn = transform.GetComponent<Button>();
if (btn==null)
{
Debug.LogError("btn is miss!!!");
}
btn.onClick.AddListener(OnBTN);
if (needPanel==null)
{
Debug.LogError("needPanel is miss!!!");
}
}
// Update is called once per frame
void Update()
{
}
void OnBTN()
{
needPanel.SetActive(true);
}
}