mergemilitary/Assets/Scripts/Core/UIManager/BasePanel.cs

32 lines
511 B
C#
Raw Normal View History

2022-05-23 13:39:59 +00:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BasePanel : MonoBehaviour
{
public Action DelClose;
public bool IsOpened => gameObject.activeSelf;
public bool IsStack = true;
public virtual void OnOpen()
{
}
public virtual void OnClose()
{
DelClose?.Invoke();
}
public virtual void OnFocus(bool pFocus)
{
}
public void Close()
{
UIManager.Instance.CloseUI(this);
}
}