feat: 드로그 보스 AI 및 런타임 상태 구조 재구성
- 드로그 전투 컨텍스트를 BossBehaviorRuntimeState 중심 구조로 정리하고 BossEnemy, 패턴 액션, 조건 노드가 마지막 실행 결과와 phase 상태를 직접 사용하도록 갱신 - BT_Drog와 재빌드 에디터 스크립트를 확장해 phase 전환, 집행 결과 분기, 거리/쿨타임 기반 패턴 선택을 드로그 전용 자산과 노드 파라미터로 재구성 - 드로그 패턴/스킬/이펙트/애니메이션 플레이스홀더 자산을 재생성하고 보스 프리팹이 새 런타임 상태 및 등록 클립 구성을 참조하도록 정리
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
using Colosseum.Enemy;
|
||||
|
||||
using Unity.Behavior;
|
||||
using Unity.Properties;
|
||||
using UnityEngine;
|
||||
|
||||
using Action = Unity.Behavior.Action;
|
||||
|
||||
/// <summary>
|
||||
/// BT가 보스의 현재 페이즈 값을 직접 설정합니다.
|
||||
/// </summary>
|
||||
[Serializable, GeneratePropertyBag]
|
||||
[NodeDescription(
|
||||
name: "Set Boss Phase",
|
||||
story: "[TargetPhase] 페이즈로 설정",
|
||||
category: "Action",
|
||||
id: "931c24f8-761f-4d07-a7a0-23c7a7678d6b")]
|
||||
public partial class SetBossPhaseAction : Action
|
||||
{
|
||||
[SerializeReference]
|
||||
[Tooltip("설정할 목표 페이즈 (1부터 시작)")]
|
||||
public BlackboardVariable<int> TargetPhase = new BlackboardVariable<int>(1);
|
||||
|
||||
[SerializeReference]
|
||||
[Tooltip("true면 페이즈 경과 시간도 함께 초기화합니다.")]
|
||||
public BlackboardVariable<bool> ResetTimer = new BlackboardVariable<bool>(true);
|
||||
|
||||
protected override Status OnStart()
|
||||
{
|
||||
BossBehaviorRuntimeState context = GameObject.GetComponent<BossBehaviorRuntimeState>();
|
||||
if (context == null)
|
||||
return Status.Failure;
|
||||
|
||||
context.SetCurrentPatternPhase(TargetPhase?.Value ?? 1, ResetTimer?.Value ?? true);
|
||||
context.LogDebug(nameof(SetBossPhaseAction), $"현재 페이즈 설정: {context.CurrentPatternPhase}");
|
||||
return Status.Success;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user