38 lines
705 B
C#
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);
|
|
}
|
|
}
|