feat: Implement DownDash ability and related systems

- Added DownDash ability with cooldown and speed configuration.
- Introduced DownDashState to handle down dashing mechanics, including gravity manipulation and animation playback.
- Updated PlayerMovement to support DownDash functionality.
- Enhanced PlayerStats to manage spring charge consumption and healing.
- Modified PlayerCombat and WeaponHitBoxInstance to support new hit confirmation events.
- Updated AbilityType to include new form types for character abilities.
- Improved Gizmos for better visualization of enemy detection and attack ranges.
- Added feedback systems for form switching in PlayerFeedback and IFeedbackPlayer.
- Refactored combat and movement states to accommodate new abilities and ensure smooth transitions.
This commit is contained in:
2026-05-22 00:09:50 +08:00
parent 534de11e5d
commit 47bdc67cdf
27 changed files with 443 additions and 129 deletions

View File

@@ -257,12 +257,29 @@ namespace BaseGames.Player
}
// ── Spring ────────────────────────────────────────────────────────────
public bool UseSpring()
/// <summary>
/// 仅扣除灵泉充能SpringState 进入前摇时调用)。
/// 回血需前摇结束后调用 <see cref="ApplySpringHeal"/>。
/// </summary>
public bool ConsumeSpringCharge()
{
if (CurrentSpringCharges <= 0) return false;
CurrentSpringCharges--;
_onSpringChargesChanged?.Raise(CurrentSpringCharges);
HealHP(_config.SpringHealAmount);
return true;
}
/// <summary>
/// 执行灵泉回血SpringState 前摇动画结束时调用)。
/// </summary>
public void ApplySpringHeal() => HealHP(_config.SpringHealAmount);
/// <summary>扣除充能并立即回血(兼容旧调用路径)。</summary>
public bool UseSpring()
{
if (!ConsumeSpringCharge()) return false;
ApplySpringHeal();
return true;
}