59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
|
namespace BITKit.UX
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 基本UX面板接口,定义了基本的UX面板功能
|
||
|
/// </summary>
|
||
|
/// <para>⭐同步打开与关闭</para>
|
||
|
/// <para>⭐异步打开与关闭</para>
|
||
|
/// <para>⭐当前可见状态</para>
|
||
|
/// <para>⭐基本UI导航回调</para>
|
||
|
public interface IUXPanel
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 该面板是否具有动画
|
||
|
/// </summary>
|
||
|
bool IsAnimate { get; }
|
||
|
/// <summary>
|
||
|
/// 该面板是否有效,用于检查该面板是否已经被销毁
|
||
|
/// </summary>
|
||
|
bool IsValid { get; }
|
||
|
/// <summary>
|
||
|
/// 该面板的索引(入口,Key)
|
||
|
/// </summary>
|
||
|
string Index { get; }
|
||
|
/// <summary>
|
||
|
/// 该面板是否启用指针
|
||
|
/// </summary>
|
||
|
bool AllowCursor { get; }
|
||
|
/// <summary>
|
||
|
/// 该面板是否启用玩家输入
|
||
|
/// </summary>
|
||
|
bool AllowInput { get; }
|
||
|
void Entry();
|
||
|
void Exit();
|
||
|
}
|
||
|
public abstract class UXPanelImplement:IUXPanel
|
||
|
{
|
||
|
protected abstract IUXPanel _iuxPanelImplementation { get; }
|
||
|
public bool IsAnimate => _iuxPanelImplementation.IsAnimate;
|
||
|
|
||
|
public bool IsValid => _iuxPanelImplementation.IsValid;
|
||
|
|
||
|
public string Index => _iuxPanelImplementation.Index;
|
||
|
|
||
|
public bool AllowCursor => _iuxPanelImplementation.AllowCursor;
|
||
|
|
||
|
public bool AllowInput => _iuxPanelImplementation.AllowInput;
|
||
|
|
||
|
public void Entry()
|
||
|
{
|
||
|
_iuxPanelImplementation.Entry();
|
||
|
}
|
||
|
|
||
|
public void Exit()
|
||
|
{
|
||
|
_iuxPanelImplementation.Exit();
|
||
|
}
|
||
|
}
|
||
|
}
|