feat: 무적 이상상태 기반 구르기 스킬 정리
This commit is contained in:
@@ -148,9 +148,34 @@ namespace Colosseum.Skills
|
||||
PlaySkillClip(skill.SkillClip);
|
||||
}
|
||||
|
||||
TriggerImmediateSelfEffectsIfNeeded(skill);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 애니메이션 이벤트가 없는 자기 자신 대상 효과는 시전 즉시 발동합니다.
|
||||
/// 버프/무적 같은 자기 강화 스킬이 이벤트 누락으로 동작하지 않는 상황을 막기 위한 보정입니다.
|
||||
/// </summary>
|
||||
private void TriggerImmediateSelfEffectsIfNeeded(SkillData skill)
|
||||
{
|
||||
if (skill == null || skill.Effects == null || skill.Effects.Count == 0)
|
||||
return;
|
||||
|
||||
if (skill.SkillClip != null && skill.SkillClip.events != null && skill.SkillClip.events.Length > 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < skill.Effects.Count; i++)
|
||||
{
|
||||
SkillEffect effect = skill.Effects[i];
|
||||
if (effect == null || effect.TargetType != TargetType.Self)
|
||||
continue;
|
||||
|
||||
if (debugMode) Debug.Log($"[Skill] Immediate self effect: {effect.name} (index {i})");
|
||||
effect.ExecuteOnCast(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 스킬 클립으로 Override Controller 생성 후 재생
|
||||
/// </summary>
|
||||
|
||||
@@ -32,16 +32,12 @@ namespace Colosseum.Skills
|
||||
[SerializeField] private bool jumpToTarget = false;
|
||||
|
||||
[Header("행동 제한")]
|
||||
[Tooltip("이 스킬을 회피 상태로 취급할지 여부")]
|
||||
[SerializeField] private bool isEvadeSkill = false;
|
||||
[Tooltip("시전 중 이동 입력 차단 여부")]
|
||||
[SerializeField] private bool blockMovementWhileCasting = true;
|
||||
[Tooltip("시전 중 점프 입력 차단 여부")]
|
||||
[SerializeField] private bool blockJumpWhileCasting = true;
|
||||
[Tooltip("시전 중 다른 스킬 입력 차단 여부")]
|
||||
[SerializeField] private bool blockOtherSkillsWhileCasting = true;
|
||||
[Tooltip("시전 중 회피 입력 차단 여부")]
|
||||
[SerializeField] private bool blockEvadeWhileCasting = true;
|
||||
|
||||
[Header("쿨타임 & 비용")]
|
||||
[Min(0f)] [SerializeField] private float cooldown = 1f;
|
||||
@@ -63,11 +59,9 @@ namespace Colosseum.Skills
|
||||
public bool UseRootMotion => useRootMotion;
|
||||
public bool IgnoreRootMotionY => ignoreRootMotionY;
|
||||
public bool JumpToTarget => jumpToTarget;
|
||||
public bool IsEvadeSkill => isEvadeSkill;
|
||||
public bool BlockMovementWhileCasting => blockMovementWhileCasting;
|
||||
public bool BlockJumpWhileCasting => blockJumpWhileCasting;
|
||||
public bool BlockOtherSkillsWhileCasting => blockOtherSkillsWhileCasting;
|
||||
public bool BlockEvadeWhileCasting => blockEvadeWhileCasting;
|
||||
public IReadOnlyList<SkillEffect> Effects => effects;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user