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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user