25 lines
504 B
C#
25 lines
504 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using GameCore;
|
|
using System;
|
|
public class CloseSelfPanel : MonoBehaviour
|
|
{
|
|
[SerializeField] Button btnClose;
|
|
private void Start()
|
|
{
|
|
btnClose.onClick.AddListener(OnClickClose);
|
|
}
|
|
|
|
private void OnClickClose()
|
|
{
|
|
try
|
|
{
|
|
UIManager.Instance.DestroyUI(gameObject.name);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Debug.Log($"<color=red>{e.Message}\n{e.StackTrace}</color>");
|
|
}
|
|
}
|
|
}
|