多轮审查和修复

This commit is contained in:
2026-05-12 15:34:08 +08:00
parent f55d2a57c3
commit ebbbb7332e
805 changed files with 838724 additions and 1905 deletions

View File

@@ -0,0 +1,51 @@
using System;
using UnityEngine;
using BaseGames.Player.States;
namespace BaseGames.Equipment
{
/// <summary>
/// 工具使用效果接口(架构 09_ProgressionModule §7
/// </summary>
public interface IToolEffect
{
void Use(PlayerController player);
}
/// <summary>
/// 带冷却时间的工具接口(可选实现)。
/// </summary>
public interface IToolCooldown
{
float CooldownDuration { get; }
}
/// <summary>
/// 典型实现:治疗药水效果。
/// </summary>
[Serializable]
public class HealToolEffect : IToolEffect
{
public int HealAmount = 4;
public void Use(PlayerController player) => player.Stats.HealHP(HealAmount);
}
/// <summary>
/// 主动工具数据 SO架构 09_ProgressionModule §7
/// 资产路径: Assets/ScriptableObjects/Equipment/Tools/Tool_{Name}.asset
/// </summary>
[CreateAssetMenu(menuName = "Equipment/Tool")]
public class ToolSO : ScriptableObject
{
public string toolId;
public string displayNameKey;
public Sprite icon;
[Tooltip("-1 = 无限使用次数")]
public int maxUses = 1;
[SerializeReference]
public IToolEffect effect; // 工具使用效果(多态)
}
}