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,6 +1,8 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using BaseGames.Player.States;
using BaseGames.Localization;
namespace BaseGames.Equipment
{
@@ -36,7 +38,7 @@ namespace BaseGames.Equipment
/// 资产路径: Assets/ScriptableObjects/Equipment/Tools/Tool_{Name}.asset
/// </summary>
[CreateAssetMenu(menuName = "BaseGames/Equipment/Tool")]
public class ToolSO : ScriptableObject
public class ToolSO : ScriptableObject, ILocalizableAsset
{
public string toolId;
public string displayNameKey;
@@ -46,6 +48,12 @@ namespace BaseGames.Equipment
public int maxUses = 1;
[SerializeReference]
public IToolEffect effect; // 工具使用效果(多态)
public IToolEffect effect;
public IEnumerable<LocalizationKeyRef> GetLocalizationKeys()
{
if (!string.IsNullOrEmpty(displayNameKey))
yield return new LocalizationKeyRef(displayNameKey, "Items", nameof(displayNameKey));
}
}
}