using System; using Cysharp.Threading.Tasks; using Unity.Mathematics; namespace BITKit.UX { /// /// 基本UX服务(GUI管理器),主要通过加载叠加面板实现 /// public interface IUXService:IDisposable { public string SettingsPath { get; set; } object Root { get; } /// /// 初始化 /// /// UniTask InitializeAsync(); /// /// 注册面板,加入注册队列 /// /// UX面板 void Register(IUXPanel panel); /// /// 注销面板 /// /// UX面板 void UnRegister(IUXPanel panel); /// /// 进入面板 /// /// 面板类型 void Entry() where T : IUXPanel; /// /// 返回上一个面板 /// void Return(); /// /// 进入面板 /// /// 已实例化的面板 void Entry(IUXPanel panel); /// /// 进入面板 /// /// 面板名称 void Entry(string panelName); /// /// 当前面板 /// IUXPanel CurrentPanel { get; } /// /// 面板改变回调 /// public event Action OnPanelChanged; /// /// 获取可交互的元素 /// /// /// /// public bool TryPick(float2 position, out object obj); } }