namespace GFramework.SourceGenerators.Abstractions.bases;
///
/// 标记类的优先级,自动生成 接口实现
///
///
/// 使用此特性可以避免手动实现 IPrioritized 接口。
/// 优先级值越小,优先级越高(负数表示高优先级)。
///
///
///
/// [Priority(10)]
/// public partial class MySystem : AbstractSystem
/// {
/// // 自动生成: public int Priority => 10;
/// }
///
///
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
{
///
/// 初始化 类的新实例
///
/// 优先级值,越小优先级越高
public PriorityAttribute(int value)
{
Value = value;
}
///
/// 获取优先级值
///
public int Value { get; }
}