60 lines
1.2 KiB
C#
60 lines
1.2 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using Game.HotFix;
|
|
|
|
public class UIBase : MonoBehaviour
|
|
{
|
|
|
|
public Button btnClose;
|
|
public object[] _InitRarams;
|
|
|
|
|
|
public virtual void Awake()
|
|
{
|
|
var tfBtnClose = transform.Find("btnClose");
|
|
if (tfBtnClose)
|
|
{
|
|
btnClose = transform.Find("btnClose").GetComponent<Button>();
|
|
}
|
|
|
|
if (btnClose != null)
|
|
{
|
|
btnClose.onClick.AddListener(Close);
|
|
}
|
|
}
|
|
|
|
public virtual void Show(params object[] _params)
|
|
{
|
|
_InitRarams = _params;
|
|
|
|
}
|
|
|
|
// public virtual void Hide()
|
|
// {
|
|
// //UIMgr.Instance.Hide(this);
|
|
//}
|
|
|
|
public virtual void Close()
|
|
{
|
|
|
|
//HotfixEntry LoadAll
|
|
//UIMgr.Instance.CloseUI(this);
|
|
}
|
|
|
|
public virtual void OnDestroy()
|
|
{
|
|
//HotfixEntry.Resources.Release(this);
|
|
//if (HotfixEntry.Resources.gameObject == null)
|
|
// return;
|
|
|
|
//if (!HotfixEntry.Resources.gameObject.activeSelf)
|
|
// return;
|
|
//HotfixEntry.Resources.CleanUnused();
|
|
}
|
|
|
|
public virtual void SkipToTab(int _tabIdx)
|
|
{
|
|
|
|
}
|
|
|
|
} |