1
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
// ReSharper disable UnassignedGetOnlyAutoProperty
|
||||
|
||||
namespace BITKit.UX
|
||||
@@ -10,7 +12,7 @@ namespace BITKit.UX
|
||||
/// <para>⭐异步打开与关闭</para>
|
||||
/// <para>⭐当前可见状态</para>
|
||||
/// <para>⭐基本UI导航回调</para>
|
||||
public interface IUXPanel
|
||||
public interface IUXPanel:IEntryElement,IUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// 该面板是否具有动画
|
||||
@@ -32,8 +34,6 @@ namespace BITKit.UX
|
||||
/// 该面板是否启用玩家输入
|
||||
/// </summary>
|
||||
bool AllowInput { get; }
|
||||
void Entry();
|
||||
void Exit();
|
||||
/// <summary>
|
||||
/// 事件回调,当面板被打开时触发
|
||||
/// </summary>
|
||||
@@ -57,16 +57,42 @@ namespace BITKit.UX
|
||||
|
||||
public bool AllowInput => _iuxPanelImplementation.AllowInput;
|
||||
|
||||
public bool IsEntered
|
||||
{
|
||||
get => service.IsEntered;
|
||||
set => service.IsEntered = value;
|
||||
}
|
||||
|
||||
public void Entry()
|
||||
{
|
||||
_iuxPanelImplementation.Entry();
|
||||
}
|
||||
|
||||
public UniTask EntryAsync()
|
||||
{
|
||||
return service.EntryAsync();
|
||||
}
|
||||
|
||||
public void Entered()
|
||||
{
|
||||
service.Entered();
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
_iuxPanelImplementation.Exit();
|
||||
}
|
||||
|
||||
public UniTask ExitAsync()
|
||||
{
|
||||
return service.ExitAsync();
|
||||
}
|
||||
|
||||
public void Exited()
|
||||
{
|
||||
service.Exited();
|
||||
}
|
||||
|
||||
public event Action OnEntry
|
||||
{
|
||||
add => _iuxPanelImplementation.OnEntry += value;
|
||||
@@ -78,5 +104,10 @@ namespace BITKit.UX
|
||||
add => _iuxPanelImplementation.OnExit += value;
|
||||
remove => _iuxPanelImplementation.OnExit -= value;
|
||||
}
|
||||
|
||||
public void OnUpdate(float deltaTime)
|
||||
{
|
||||
service.OnUpdate(deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user