- 드로그 BT를 페이즈 전환, 부활 트리거, 가중치 근접 패턴 중심으로 재구성 - 땅 울리기 및 콤보-기본기1_3 패턴/스킬/이펙트를 추가하고 기존 평타 파생 자산을 정리 - 드로그 행동 검증용 PlayMode/Editor 테스트와 관련 런타임 상태 추적을 추가
54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using System;
|
|
|
|
using Colosseum.Enemy;
|
|
|
|
using Unity.Behavior;
|
|
using Unity.Properties;
|
|
using UnityEngine;
|
|
|
|
using Action = Unity.Behavior.Action;
|
|
|
|
/// <summary>
|
|
/// 최근 전투 부활 트리거에서 우선 압박할 대상을 선택합니다.
|
|
/// </summary>
|
|
[Serializable, GeneratePropertyBag]
|
|
[NodeDescription(
|
|
name: "Select Recent Revive Target",
|
|
story: "최근 부활 트리거 대상을 [Target]으로 선택",
|
|
category: "Action",
|
|
id: "464c3911-46d3-4138-88cf-8ba696ba4c13")]
|
|
public partial class SelectRecentReviveTargetAction : Action
|
|
{
|
|
[SerializeReference]
|
|
public BlackboardVariable<GameObject> Target;
|
|
|
|
[SerializeReference]
|
|
public BlackboardVariable<float> MaxAge = new BlackboardVariable<float>(4f);
|
|
|
|
[SerializeReference]
|
|
public BlackboardVariable<bool> PreferCaster = new BlackboardVariable<bool>(true);
|
|
|
|
[SerializeReference]
|
|
public BlackboardVariable<bool> FallbackToRevivedTarget = new BlackboardVariable<bool>(true);
|
|
|
|
protected override Status OnStart()
|
|
{
|
|
BossBehaviorRuntimeState runtimeState = GameObject.GetComponent<BossBehaviorRuntimeState>();
|
|
if (runtimeState == null)
|
|
return Status.Failure;
|
|
|
|
GameObject resolvedTarget = runtimeState.ResolveRecentReviveTriggerTarget(
|
|
MaxAge?.Value ?? 0f,
|
|
PreferCaster?.Value ?? true,
|
|
FallbackToRevivedTarget?.Value ?? true);
|
|
|
|
if (resolvedTarget == null)
|
|
return Status.Failure;
|
|
|
|
Target.Value = resolvedTarget;
|
|
runtimeState.SetCurrentTarget(resolvedTarget);
|
|
runtimeState.LogDebug(nameof(SelectRecentReviveTargetAction), $"부활 트리거 대상 선택: {resolvedTarget.name}");
|
|
return Status.Success;
|
|
}
|
|
}
|