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

@@ -13,7 +13,8 @@
"BaseGames.Input",
"BaseGames.Combat",
"BaseGames.Feedback",
"Kybernetik.Animancer"
"Kybernetik.Animancer",
"BaseGames.Localization"
],
"autoReferenced": true,
"overrideReferences": false,

View File

@@ -1,6 +1,8 @@
using System.Collections.Generic;
using UnityEngine;
using Animancer;
using BaseGames.Combat;
using BaseGames.Localization;
namespace BaseGames.Skills
{
@@ -35,7 +37,7 @@ namespace BaseGames.Skills
/// 路径: Assets/Scripts/Skills/FormSkillSO.cs
/// </summary>
[CreateAssetMenu(menuName = "BaseGames/Skills/FormSkill")]
public class FormSkillSO : ScriptableObject
public class FormSkillSO : ScriptableObject, ILocalizableAsset
{
[Header("Identity")]
public string skillId;
@@ -81,5 +83,13 @@ namespace BaseGames.Skills
/// 命名规范: Assets/Prefabs/Skills/SKL_{skillId}_HitBox.prefab
/// </summary>
public GameObject SkillHitBoxPrefab;
public IEnumerable<LocalizationKeyRef> GetLocalizationKeys()
{
if (!string.IsNullOrEmpty(displayNameKey))
yield return new LocalizationKeyRef(displayNameKey, "Skills", nameof(displayNameKey));
if (!string.IsNullOrEmpty(descriptionKey))
yield return new LocalizationKeyRef(descriptionKey, "Skills", nameof(descriptionKey));
}
}
}