37 lines
820 B
C#
37 lines
820 B
C#
|
using System;
|
||
|
using UnityEngine;
|
||
|
|
||
|
|
||
|
namespace Core
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Base class for all UI components.
|
||
|
/// </summary>
|
||
|
public abstract class UIBase : MonoBehaviour
|
||
|
{
|
||
|
public bool IsOpenOnFirstLoad;
|
||
|
/// <summary>
|
||
|
/// Called when the UI is shown.
|
||
|
/// </summary>
|
||
|
public virtual void Show()
|
||
|
{
|
||
|
gameObject.SetActive(true);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Called when the UI is hidden.
|
||
|
/// </summary>
|
||
|
public virtual void Hide()
|
||
|
{
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Called when the UI is initialized.
|
||
|
/// </summary>
|
||
|
public virtual void Initialize()
|
||
|
{
|
||
|
// Override in derived classes for initialization logic.
|
||
|
}
|
||
|
}
|
||
|
}
|