feat: add enemy threat targeting system

This commit is contained in:
2026-03-19 20:43:57 +09:00
parent 287ff4dc83
commit a65ba77931
4 changed files with 355 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ using UnityEngine;
using Action = Unity.Behavior.Action;
using Unity.Properties;
using Colosseum.Combat;
using Colosseum.Enemy;
[Serializable, GeneratePropertyBag]
[NodeDescription(name: "FindTarget", story: "[타겟] ", category: "Action", id: "bb947540549026f3c5625c6d19213311")]
@@ -30,6 +31,17 @@ public partial class FindTargetAction : Action
return Status.Failure;
}
EnemyBase enemy = GameObject.GetComponent<EnemyBase>();
if (enemy != null && enemy.UseThreatSystem)
{
GameObject threatTarget = enemy.GetHighestThreatTarget(Target?.Value, Tag.Value);
if (threatTarget != null)
{
Target.Value = threatTarget;
return Status.Success;
}
}
// 사망하지 않은 타겟 찾기
foreach (GameObject candidate in candidates)
{