40 lines
640 B
C#
40 lines
640 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
|
||
|
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>();
|
||
|
btnClose.onClick.AddListener(Hide);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public virtual void Show(params object[] _params) {
|
||
|
_InitRarams = _params;
|
||
|
|
||
|
}
|
||
|
|
||
|
public virtual void Hide()
|
||
|
{
|
||
|
UIMgr.Instance.Hide(this);
|
||
|
}
|
||
|
|
||
|
public virtual void Close() {
|
||
|
UIMgr.Instance.CloseUI(this);
|
||
|
}
|
||
|
|
||
|
public virtual void SkipToTab(int _tabIdx)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|