chore: initial commit

This commit is contained in:
2026-05-08 11:04:00 +08:00
commit f55d2a57c3
6278 changed files with 866081 additions and 0 deletions

View File

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