Files
zeling_v2/Assets/Scripts/Combat/ShieldComponent.cs
2026-05-08 11:04:00 +08:00

21 lines
684 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using UnityEngine;
namespace BaseGames.Combat
{
/// <summary>
/// 护盾组件Phase 1 存根)。实现 IShieldable 接口供 HurtBox 注入。
/// Phase 2 实现完整护盾逻辑(护盾值、再生、破盾事件)。
/// </summary>
public class ShieldComponent : MonoBehaviour, IShieldable
{
public bool HasShield { get; private set; }
/// <summary>
/// 尝试以护盾吸收伤害。
/// 返回穿透量0 = 全部吸收,>0 = 穿透量继续走 TakeDamage 流程)。
/// Phase 1护盾不存在全量穿透。
/// </summary>
public int AbsorbDamage(int amount) => amount;
}
}