27 lines
591 B
C#
27 lines
591 B
C#
using UnityEngine;
|
|
|
|
namespace UI
|
|
{
|
|
public abstract class UIBase : MonoBehaviour
|
|
{
|
|
public bool exclusive = true;
|
|
public bool needPause = true;
|
|
public bool isInputOccupied = false;
|
|
|
|
public KeyCode actionButton = KeyCode.None;
|
|
|
|
// 显示或隐藏窗口
|
|
public virtual void Show()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public virtual void Hide()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
|
|
// 判断是否可见
|
|
public bool IsVisible => gameObject.activeInHierarchy;
|
|
}
|
|
} |