namespace BaseGames.Combat { /// /// 可受击实体接口。PlayerController 和 EnemyBase 实现此接口。 /// HurtBox.Awake 通过 GetComponentInParent<IDamageable>() 注入。 /// public interface IDamageable { bool IsInvincible { get; } int Defense { get; } void TakeDamage(DamageInfo info); } /// /// 可持有霸体的实体接口。HurtBox 在 ReceiveDamage 中做等级比较。 /// public interface IPoiseSource { PoiseLevel GetCurrentPoiseLevel(); } /// /// 护盾接口(玩家专属)。由 PlayerController.Awake() 注入 HurtBox。 /// AbsorbDamage 返回穿透量(0 = 全部吸收,>0 = 穿透量继续走 TakeDamage 流程)。 /// public interface IShieldable { bool HasShield { get; } int AbsorbDamage(int amount); } /// /// 可破坏机关/障碍物接口。HitBox 在命中非 HurtBox 对象时尝试调用。 /// public interface IBreakable { void TryInteract(DamageInfo info); } /// /// 可施加状态效果的实体接口(避免 Combat 直接引用 StatusEffects 程序集)。 /// StatusEffectManager 实现此接口;HurtBox.ReceiveDamage 步骤 8 通过此接口调用。 /// public interface IStatusEffectable { void ApplyStatusEffect(DamageType type); } }