/******************************************************************** 文件: UIElementAttribute.cs 作者: 梦语 邮箱: 1982614048@qq.com 创建时间: 2024/03/29 17:28:19 最后修改: 梦语 最后修改时间: 2024/04/03 16:01:10 功能: *********************************************************************/ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Ether { /// /// UI元素的特性 /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public class UIElementAttribute : Attribute { /// /// 界面层级 /// public FrameTier tier = FrameTier.Middle; /// /// 界面类型 /// public FrameType frameType = FrameType.Frame; /// /// 界面路径 /// public string framePrefabPath; /// /// 界面关闭时不销毁界面 /// public bool isDontCloseDestroy; public UIElementAttribute(FrameTier tier) { this.tier = tier; } public UIElementAttribute(FrameType frameType) { this.frameType = frameType; } public UIElementAttribute(string framePrefabPath) { this.framePrefabPath = framePrefabPath; } public UIElementAttribute(bool isDontCloseDestroy) { this.isDontCloseDestroy = isDontCloseDestroy; } public UIElementAttribute(FrameTier tier = FrameTier.Middle, FrameType frameType = FrameType.Frame) { this.tier = tier; this.frameType = frameType; } public UIElementAttribute(FrameTier tier = FrameTier.Middle, FrameType frameType = FrameType.Frame, string framePrefabPath = "") { this.tier = tier; this.frameType = frameType; this.framePrefabPath = framePrefabPath; } public UIElementAttribute(FrameTier tier = FrameTier.Middle, FrameType frameType = FrameType.Frame, string framePrefabPath = "", bool isDontCloseDestroy = false) { this.tier = tier; this.frameType = frameType; this.framePrefabPath = framePrefabPath; this.isDontCloseDestroy = isDontCloseDestroy; } } }