IndieGame/config/Table/Tools/Luban/Templates/common/cs/enum.sbn

31 lines
741 B
Plaintext
Raw Normal View History

2024-10-11 10:12:15 +08:00
{{~
comment = __enum.comment
items = __enum.items
~}}
using UnityEngine;
{{namespace_with_grace_begin __namespace_with_top_module}}
{{~if comment != '' ~}}
/// <summary>
/// {{escape_comment comment}}
/// </summary>
{{~end~}}
{{~if __enum.is_flags~}}
[System.Flags]
{{~end~}}
public enum {{__name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/// <summary>
/// {{escape_comment item.comment_or_alias}}
/// </summary>
[InspectorName("{{escape_comment item.comment_or_alias}}")]
{{~end~}}
{{format_enum_item_name __code_style item.name}} = {{item.value}},
{{~end~}}
}
{{namespace_with_grace_end __namespace_with_top_module}}