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