Files
Colosseum/Assets/_Game/Scripts/AI/BehaviorActions/Conditions/HasTargetCondition.cs
dal4segno c265f980db chore: Assets 디렉토리 구조 정리 및 네이밍 컨벤션 적용
- Assets/_Game/ 하위로 게임 에셋 통합
- External/ 패키지 벤더별 분류 (Synty, Animations, UI)
- 에셋 네이밍 컨벤션 확립 및 적용
  (Data_Skill_, Data_SkillEffect_, Prefab_, Anim_, Model_, BT_ 등)
- pre-commit hook으로 네이밍 컨벤션 자동 검사 추가
- RESTRUCTURE_CHECKLIST.md 작성

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 19:08:27 +09:00

38 lines
1.0 KiB
C#

using System;
using UnityEngine;
using Unity.Behavior;
using Unity.Properties;
using Condition = Unity.Behavior.Condition;
using Colosseum.Combat;
namespace Colosseum.AI.BehaviorActions.Conditions
{
/// <summary>
/// 타겟이 존재하고 살아있는지 확인합니다.
/// </summary>
[Serializable, GeneratePropertyBag]
[NodeDescription(name: "Has Target", story: "Has [Target]", category: "Combat")]
public partial class HasTargetCondition : Condition
{
[SerializeReference]
public BlackboardVariable<GameObject> Target;
public override bool IsTrue()
{
if (Target.Value == null || !Target.Value.activeInHierarchy)
{
return false;
}
// 타겟이 사망했는지 확인
IDamageable damageable = Target.Value.GetComponent<IDamageable>();
if (damageable != null && damageable.IsDead)
{
return false;
}
return true;
}
}
}