using UnityEngine;
using XGame.Framework.Asyncs;

namespace XGame.Framework.UI
{
    public interface IUIModule
    {
        Camera Camera { get; }
        Canvas GetCanvas(UILayer layer);
        IAsync OpenAsync(UIKey uikey, object intent = null);
        /// <summary>
        /// 关闭UI
        /// </summary>
        /// <param name="uikey"></param>
        /// <param name="isDestroy">是否销毁</param>
        void Close(UIKey uikey, bool isDestroy = false);
        IAsync Preload(UIKey uikey);
    }
}
