卡牌更新
This commit is contained in:
@@ -15,11 +15,7 @@ namespace Continentis.MainGame.Base
|
||||
public partial class EditorBaseCollection : BaseCollection<EditorBaseCollection>
|
||||
{
|
||||
[Title("角色")]
|
||||
[Tooltip("核心属性\nKey 为词条 ID(如 Strength),Value 为词条中文描述(如 力量)")]
|
||||
[SerializedDictionarySettings("Key", "Description")]
|
||||
public SerializedDictionary<string, string> characterCoreAttributes = new SerializedDictionary<string, string>();
|
||||
|
||||
[Tooltip("通用与状态属性\nKey 为词条 ID(如 Health),Value 为词条中文描述(如 角色生命值)")]
|
||||
[Tooltip("角色属性\nKey 为词条 ID(如 Health),Value 为词条中文描述(如 角色生命值)")]
|
||||
[SerializedDictionarySettings("Key", "Description")]
|
||||
public SerializedDictionary<string, string> characterGeneralAttributes = new SerializedDictionary<string, string>();
|
||||
|
||||
@@ -81,15 +77,6 @@ namespace Continentis.MainGame.Base
|
||||
|
||||
foreach (var coll in GetAllCollections())
|
||||
{
|
||||
if (coll.characterCoreAttributes != null)
|
||||
{
|
||||
allItems.AddRange(coll.characterCoreAttributes.Select(kvp => new ValueDropdownItem<string>
|
||||
{
|
||||
Text = $"{kvp.Key} ({kvp.Value})",
|
||||
Value = kvp.Key
|
||||
}));
|
||||
}
|
||||
|
||||
if (coll.characterGeneralAttributes != null)
|
||||
{
|
||||
allItems.AddRange(coll.characterGeneralAttributes.Select(kvp => new ValueDropdownItem<string>
|
||||
@@ -176,24 +163,8 @@ namespace Continentis.MainGame.Base
|
||||
sb.AppendLine($" public static class {className}");
|
||||
sb.AppendLine(" {");
|
||||
|
||||
// 生成核心属性
|
||||
sb.AppendLine(" // ── 核心属性 (Core) ──────────────────────────────────");
|
||||
if (characterCoreAttributes != null)
|
||||
{
|
||||
foreach (var kvp in characterCoreAttributes)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(kvp.Key)) continue;
|
||||
if (!string.IsNullOrWhiteSpace(kvp.Value))
|
||||
{
|
||||
sb.AppendLine($" /// <summary> {kvp.Value} </summary>");
|
||||
}
|
||||
sb.AppendLine($" public const string {kvp.Key} = \"{kvp.Key}\";");
|
||||
sb.AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
// 生成通用属性
|
||||
sb.AppendLine(" // ── 通用属性 (General) ───────────────────────────────");
|
||||
// 生成属性
|
||||
sb.AppendLine(" // ── 属性 (General) ───────────────────────────────");
|
||||
if (characterGeneralAttributes != null)
|
||||
{
|
||||
foreach (var kvp in characterGeneralAttributes)
|
||||
|
||||
Reference in New Issue
Block a user