UI系统优化
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user