113 lines
4.1 KiB
C#
113 lines
4.1 KiB
C#
|
|
using System;
|
||
|
|
|
||
|
|
namespace BehaviorDesigner.Runtime.Tasks
|
||
|
|
{
|
||
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class LinkedTaskAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class InspectTaskAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
|
||
|
|
public abstract class ObjectDrawerAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class RequiredFieldAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class SharedRequiredAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class TooltipAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string Tooltip { get { return mTooltip; } }
|
||
|
|
public readonly string mTooltip;
|
||
|
|
public TooltipAttribute(string tooltip) { mTooltip = tooltip; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
|
||
|
|
public class TaskIconAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string IconPath { get { return mIconPath; } set { mIconPath = value; } }
|
||
|
|
public string LightIconGUID { get { return mLightIconGUID; } }
|
||
|
|
public string DarkIconGUID { get { return mDarkIconGUID; } }
|
||
|
|
|
||
|
|
private string mIconPath;
|
||
|
|
private string mLightIconGUID;
|
||
|
|
private string mDarkIconGUID;
|
||
|
|
|
||
|
|
public TaskIconAttribute(string iconString) {
|
||
|
|
if (iconString.ToLower().Contains(".")) {
|
||
|
|
mIconPath = iconString;
|
||
|
|
} else { // GUID.
|
||
|
|
mLightIconGUID = mDarkIconGUID = iconString;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
public TaskIconAttribute(string lightIconGUID, string darkIconGUID)
|
||
|
|
{
|
||
|
|
mLightIconGUID = lightIconGUID;
|
||
|
|
mDarkIconGUID = darkIconGUID;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class HelpURLAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string URL { get { return mURL; } }
|
||
|
|
private readonly string mURL;
|
||
|
|
public HelpURLAttribute(string url) { mURL = url; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
|
||
|
|
public class TaskCategoryAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string Category { get { return mCategory; } }
|
||
|
|
public readonly string mCategory;
|
||
|
|
public TaskCategoryAttribute(string category) { mCategory = category; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class TaskDescriptionAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string Description { get { return mDescription; } }
|
||
|
|
public readonly string mDescription;
|
||
|
|
public TaskDescriptionAttribute(string description) { mDescription = description; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class TaskNameAttribute : Attribute
|
||
|
|
{
|
||
|
|
public string Name { get { return mName; } }
|
||
|
|
public readonly string mName;
|
||
|
|
public TaskNameAttribute(string name) { mName = name; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
|
||
|
|
public class RequiredComponentAttribute : Attribute
|
||
|
|
{
|
||
|
|
public Type ComponentType { get { return mComponentType; } }
|
||
|
|
public readonly Type mComponentType;
|
||
|
|
public RequiredComponentAttribute(Type componentType) { mComponentType = componentType; }
|
||
|
|
}
|
||
|
|
|
||
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
||
|
|
public class SkipErrorCheckAttribute : Attribute
|
||
|
|
{
|
||
|
|
// Intentionally left blank
|
||
|
|
}
|
||
|
|
}
|