namespace BITKit.UX
{
///
/// 基本UX面板接口,定义了基本的UX面板功能
///
/// ⭐同步打开与关闭
/// ⭐异步打开与关闭
/// ⭐当前可见状态
/// ⭐基本UI导航回调
public interface IUXPanel
{
///
/// 该面板是否具有动画
///
bool IsAnimate { get; }
///
/// 该面板是否有效,用于检查该面板是否已经被销毁
///
bool IsValid { get; }
///
/// 该面板的索引(入口,Key)
///
string Index { get; }
///
/// 该面板是否启用指针
///
bool AllowCursor { get; }
///
/// 该面板是否启用玩家输入
///
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();
}
}
}