feat: 플레이어 다운 및 넉백 피격 반응 추가
- HitReactionController로 다운과 넉백 전용 로직을 분리 - 다운 시작, 루프, 회복 애니메이션과 DownEffect를 연결 - 행동 상태와 스킬 취소가 피격 반응과 연동되도록 정리 - 자동 검증 러너에 다운 및 넉백 검증을 추가
This commit is contained in:
42
Assets/_Game/Scripts/Skills/Effects/DownEffect.cs
Normal file
42
Assets/_Game/Scripts/Skills/Effects/DownEffect.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
|
||||
using Colosseum.Player;
|
||||
|
||||
namespace Colosseum.Skills.Effects
|
||||
{
|
||||
/// <summary>
|
||||
/// 대상에게 다운 상태를 적용하는 스킬 효과입니다.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "DownEffect", menuName = "Colosseum/Skills/Effects/Down")]
|
||||
public class DownEffect : SkillEffect
|
||||
{
|
||||
[Header("Settings")]
|
||||
[Tooltip("다운 지속 시간")]
|
||||
[Min(0f)] [SerializeField] private float duration = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// 다운 지속 시간
|
||||
/// </summary>
|
||||
public float Duration => duration;
|
||||
|
||||
/// <summary>
|
||||
/// 다운 효과를 적용합니다.
|
||||
/// </summary>
|
||||
protected override void ApplyEffect(GameObject source, GameObject target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Debug.LogWarning("[DownEffect] Target is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!target.TryGetComponent(out HitReactionController hitReactionController))
|
||||
{
|
||||
Debug.LogWarning($"[DownEffect] HitReactionController not found on target: {target.name}");
|
||||
return;
|
||||
}
|
||||
|
||||
hitReactionController.ApplyDown(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user