feat: 드로그 BT 및 전투 패턴 재구성
- 드로그 BT를 페이즈 전환, 부활 트리거, 가중치 근접 패턴 중심으로 재구성 - 땅 울리기 및 콤보-기본기1_3 패턴/스킬/이펙트를 추가하고 기존 평타 파생 자산을 정리 - 드로그 행동 검증용 PlayMode/Editor 테스트와 관련 런타임 상태 추적을 추가
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
using Unity.Behavior;
|
||||
using Unity.Properties;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Colosseum.AI.BehaviorActions.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// 후보 패턴 중 현재 실행 가능한 패턴이 하나라도 있는지 확인합니다.
|
||||
/// </summary>
|
||||
[Serializable, GeneratePropertyBag]
|
||||
[Condition(name: "Has Any Ready Pattern", story: "후보 패턴 중 실행 가능한 패턴이 있는가?", id: "f2c9e62a-f5ea-43c5-8e88-b94a449e7c7f")]
|
||||
[NodeDescription(
|
||||
name: "Has Any Ready Pattern",
|
||||
story: "후보 패턴 중 실행 가능한 패턴이 있는가?",
|
||||
category: "Condition/Pattern")]
|
||||
public partial class HasAnyReadyPatternCondition : Unity.Behavior.Condition
|
||||
{
|
||||
[SerializeReference] public BlackboardVariable<BossPatternData> Pattern1;
|
||||
[SerializeReference] public BlackboardVariable<float> Weight1 = new BlackboardVariable<float>(1f);
|
||||
[SerializeReference] public BlackboardVariable<BossPatternData> Pattern2;
|
||||
[SerializeReference] public BlackboardVariable<float> Weight2 = new BlackboardVariable<float>(1f);
|
||||
[SerializeReference] public BlackboardVariable<BossPatternData> Pattern3;
|
||||
[SerializeReference] public BlackboardVariable<float> Weight3 = new BlackboardVariable<float>(1f);
|
||||
[SerializeReference] public BlackboardVariable<BossPatternData> Pattern4;
|
||||
[SerializeReference] public BlackboardVariable<float> Weight4 = new BlackboardVariable<float>(1f);
|
||||
[SerializeReference] public BlackboardVariable<BossPatternData> Pattern5;
|
||||
[SerializeReference] public BlackboardVariable<float> Weight5 = new BlackboardVariable<float>(1f);
|
||||
|
||||
public override bool IsTrue()
|
||||
{
|
||||
WeightedPatternCandidate[] candidates =
|
||||
{
|
||||
new WeightedPatternCandidate(Pattern1?.Value, Weight1?.Value ?? 0f),
|
||||
new WeightedPatternCandidate(Pattern2?.Value, Weight2?.Value ?? 0f),
|
||||
new WeightedPatternCandidate(Pattern3?.Value, Weight3?.Value ?? 0f),
|
||||
new WeightedPatternCandidate(Pattern4?.Value, Weight4?.Value ?? 0f),
|
||||
new WeightedPatternCandidate(Pattern5?.Value, Weight5?.Value ?? 0f),
|
||||
};
|
||||
|
||||
return WeightedPatternSelector.HasAnyReadyPattern(GameObject, candidates);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e0445cb63a4144ee9f4361c0729d95a
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
using Colosseum.Enemy;
|
||||
|
||||
using Unity.Behavior;
|
||||
using Unity.Properties;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Colosseum.AI.BehaviorActions.Conditions
|
||||
{
|
||||
/// <summary>
|
||||
/// 최근 전투 부활 트리거가 아직 유효한지 확인합니다.
|
||||
/// </summary>
|
||||
[Serializable, GeneratePropertyBag]
|
||||
[Condition(name: "Is Recent Revive Trigger", story: "최근 [MaxAge]초 이내 부활 트리거가 있는가?", id: "d12890b1-0cb0-4586-a61f-885e7d0e97ee")]
|
||||
[NodeDescription(
|
||||
name: "Is Recent Revive Trigger",
|
||||
story: "최근 [MaxAge]초 이내 부활 트리거가 있는가?",
|
||||
category: "Condition/Pattern")]
|
||||
public partial class IsRecentReviveTriggerCondition : Unity.Behavior.Condition
|
||||
{
|
||||
[SerializeReference]
|
||||
[Tooltip("부활 트리거를 유효하다고 간주할 최대 시간(초)")]
|
||||
public BlackboardVariable<float> MaxAge = new BlackboardVariable<float>(4f);
|
||||
|
||||
public override bool IsTrue()
|
||||
{
|
||||
BossBehaviorRuntimeState runtimeState = GameObject.GetComponent<BossBehaviorRuntimeState>();
|
||||
return runtimeState != null && runtimeState.HasRecentReviveTrigger(MaxAge?.Value ?? 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67f09ee2c79dabe70afb218591cde315
|
||||
Reference in New Issue
Block a user