43 lines
785 B
C#
43 lines
785 B
C#
using UnityEngine;
|
|
|
|
namespace Script.UI
|
|
{
|
|
public abstract class PanelBase : MonoBehaviour, IPanel
|
|
{
|
|
[SerializeField] private PanelType _panelType;
|
|
public PanelType panelType => _panelType;
|
|
|
|
private void Awake()
|
|
{
|
|
Init();
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
Dispose();
|
|
}
|
|
|
|
public virtual void Init()
|
|
{
|
|
}
|
|
|
|
public virtual void Open()
|
|
{
|
|
this.gameObject.SetActive(true);
|
|
ResetPanelData();
|
|
}
|
|
|
|
public virtual void Close()
|
|
{
|
|
this.gameObject.SetActive(false);
|
|
}
|
|
|
|
public virtual void Dispose()
|
|
{
|
|
}
|
|
|
|
public virtual void ResetPanelData()
|
|
{
|
|
}
|
|
}
|
|
} |