기존 시스템 재사용 프로토타입 보존

This commit is contained in:
2026-09-01 08:56:15 +09:00
parent 2f6e80fd57
commit b95c5bdb13
58 changed files with 714 additions and 3298 deletions
+11 -1
View File
@@ -11,6 +11,8 @@ namespace Northbound
[Header("Attack Settings")]
public float attackCooldown = 0.5f;
public LayerMask attackableLayer = ~0;
public bool useFacingArc = false;
[Range(-1f, 1f)] public float minimumFacingDot = 0.25f;
[Header("Animation")]
public string attackAnimationTrigger = "Attack";
@@ -72,7 +74,7 @@ namespace Northbound
PlayAttackAnimation();
// 애니메이션이 없으면 즉시 공격 실행
if (_animator == null || string.IsNullOrEmpty(attackAnimationTrigger))
if (!useAnimationEvents || _animator == null || string.IsNullOrEmpty(attackAnimationTrigger))
{
PerformAttack();
_isAttacking = false;
@@ -89,6 +91,14 @@ namespace Northbound
if (hit.transform.root == transform.root)
continue;
if (useFacingArc)
{
Vector3 targetDirection = hit.bounds.center - transform.position;
targetDirection.y = 0f;
if (targetDirection.sqrMagnitude > 0.01f && Vector3.Dot(transform.forward, targetDirection.normalized) < minimumFacingDot)
continue;
}
var targetDamageable = hit.GetComponent<IDamageable>();
var targetTeamMember = hit.GetComponent<ITeamMember>();