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:
@@ -34,21 +34,25 @@ namespace BaseGames.Player
|
||||
{
|
||||
if (_weaponManager != null)
|
||||
_weaponManager.OnWeaponChanged -= HandleWeaponChanged;
|
||||
UnsubscribeDownHit();
|
||||
UnsubscribeHitEvents();
|
||||
}
|
||||
|
||||
private void HandleWeaponChanged(WeaponSO _)
|
||||
{
|
||||
UnsubscribeDownHit();
|
||||
UnsubscribeHitEvents();
|
||||
_currentHitBoxInstance = _weaponManager.ActiveHitBoxInstance;
|
||||
if (_currentHitBoxInstance != null)
|
||||
{
|
||||
_currentHitBoxInstance.OnDownHitConfirmed += HandleDownHitConfirmed;
|
||||
_currentHitBoxInstance.OnHitConfirmed += OnHitConfirmed;
|
||||
}
|
||||
}
|
||||
|
||||
private void UnsubscribeDownHit()
|
||||
private void UnsubscribeHitEvents()
|
||||
{
|
||||
if (_currentHitBoxInstance == null) return;
|
||||
_currentHitBoxInstance.OnDownHitConfirmed -= HandleDownHitConfirmed;
|
||||
_currentHitBoxInstance.OnHitConfirmed -= OnHitConfirmed;
|
||||
_currentHitBoxInstance = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user