UI系统优化

This commit is contained in:
2026-05-25 11:54:37 +08:00
parent c7057db27d
commit 3c812cfb41
130 changed files with 4738 additions and 477 deletions

View File

@@ -1,9 +1,11 @@
using System.Collections.Generic;
using UnityEngine;
using BaseGames.Localization;
namespace BaseGames.Dialogue
{
/// <summary>
/// 对话角色定义 SO(架构 14_NarrativeModule §3
/// (架构 14_NarrativeModule §3
/// 将 NPC 的显示名、头像、对话气泡颜色集中在一处管理。
/// DialogueLine.actor 引用此 SO修改头像/名称只需改一个资产,
/// 无需批量编辑所有对话行。
@@ -11,7 +13,7 @@ namespace BaseGames.Dialogue
/// 资产路径Assets/_Game/Data/Dialogue/Actors/Actor_{actorId}.asset
/// </summary>
[CreateAssetMenu(menuName = "BaseGames/Dialogue/DialogueActor")]
public class DialogueActorSO : ScriptableObject
public class DialogueActorSO : ScriptableObject, ILocalizableAsset
{
[Header("标识")]
[Tooltip("唯一 ID如 \"NPC_Elder\",供 DialogueLine 引用")]
@@ -77,5 +79,11 @@ namespace BaseGames.Dialogue
}
}
#endif
public IEnumerable<LocalizationKeyRef> GetLocalizationKeys()
{
if (!string.IsNullOrEmpty(nameKey))
yield return new LocalizationKeyRef(nameKey, "Dialogue", nameof(nameKey));
}
}
}