首次提交
This commit is contained in:
19
Assets/Scripts/Demo/Attributes.cs
Normal file
19
Assets/Scripts/Demo/Attributes.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = true)]
|
||||
public class ShowIconAttribute : PropertyAttribute
|
||||
{
|
||||
public readonly string icon;
|
||||
public ShowIconAttribute(string icon) => this.icon = icon;
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = true, AllowMultiple = true)]
|
||||
public class OpCountAttribute : PropertyAttribute
|
||||
{
|
||||
public readonly int count;
|
||||
public OpCountAttribute(int count) => this.count = count;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user