feat: 드로그 Phase 3 연타2강타-도약 조합 패턴 추가
- Phase 3 대표 조합 패턴 에셋 생성 (Data_Pattern_Drog_연타2강타-도약) - 연타2-강타(오른손치기+스윙) → 대기 0.5초 → 조건부 도약(점프+점프착지) - minPhase=3, category=Big, cooldown=22초 - 거리 초과 대상 없으면 도약 스킵 - BT에 조합 패턴 브랜치 추가 (comboBranch → Sequence 구조) - Sequence: 연타2강타 실행 → Branch(거리 초과 대상 존재?) → 도약 실행 - IsTargetBeyondDistanceCondition으로 조건부 도약이 BT에 시각화됨 - Drog 프리팹 comboPattern 슬롯에 에셋 할당 - 도약 패턴에 targetMode: Mobility 추가 - BT 리빌드 스크립트에 combo Sequence 구조 반영 - 전체 노드 간격 확대 (stepY 220→320)으로 가독성 개선
This commit is contained in:
@@ -230,13 +230,13 @@ namespace Colosseum.Editor
|
||||
|
||||
const float branchX = -800f;
|
||||
const float truePortOffsetX = 203f;
|
||||
const float truePortOffsetY = 110f;
|
||||
const float truePortOffsetY = 120f;
|
||||
const float falsePortOffsetX = -211f;
|
||||
const float falsePortOffsetY = 114f;
|
||||
const float falsePortOffsetY = 124f;
|
||||
const float actionOffsetX = 202f;
|
||||
const float actionOffsetY = 199f;
|
||||
const float actionOffsetY = 219f;
|
||||
const float startY = -800f;
|
||||
const float stepY = 220f;
|
||||
const float stepY = 320f;
|
||||
|
||||
// #1 Punish — 다운 추가타 (전제 조건: 다운된 대상이 반경 이내에 있어야 함)
|
||||
object downBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY));
|
||||
@@ -267,17 +267,43 @@ namespace Colosseum.Editor
|
||||
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
||||
LinkTarget(signatureUseNode, targetVariable);
|
||||
|
||||
// #4 Combo — 콤보 패턴 (드문 조합, 선택적)
|
||||
// #4 Combo — 콤보 패턴 + 조건부 도약 (Sequence)
|
||||
// comboBranch.True → Sequence:
|
||||
// Child 1: 연타2-강타 실행
|
||||
// Child 2: Branch(거리 초과 대상 존재) → 도약 실행
|
||||
// 거리 초과 대상이 없으면 Branch Failure → Sequence Failure → comboBranch Failure → primaryBranch로 연결
|
||||
object comboBranch = null;
|
||||
object comboUseNode = null;
|
||||
if (comboPattern != null)
|
||||
{
|
||||
// 메인 체인용 Branch (콤보 준비 + 페이즈 조건)
|
||||
comboBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 3));
|
||||
AttachPatternReadyCondition(comboBranch, comboPattern, authoringAssembly);
|
||||
AttachPhaseConditionIfNeeded(comboBranch, comboPattern, authoringAssembly);
|
||||
comboUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(branchX + actionOffsetX, startY + stepY * 3 + actionOffsetY));
|
||||
|
||||
// Sequence: 콤보 실행 → 조건부 도약
|
||||
object comboSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod,
|
||||
runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true),
|
||||
new Vector2(branchX + 220f, startY + stepY * 3));
|
||||
|
||||
// Child 1: 콤보 패턴 실행 (연타2-강타 + 대기)
|
||||
comboUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(branchX + 400f, startY + stepY * 3));
|
||||
SetNodeFieldValue(comboUseNode, "Pattern", comboPattern, setFieldValueMethod);
|
||||
LinkTarget(comboUseNode, targetVariable);
|
||||
|
||||
// Child 2: 조건부 도약 (거리 초과 대상 있을 때만)
|
||||
object comboLeapBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX + 220f, startY + stepY * 3 + 180f));
|
||||
AttachConditionWithValue(comboLeapBranch, typeof(IsTargetBeyondDistanceCondition), "minDistance", mobilityTriggerDistance, authoringAssembly);
|
||||
object comboLeapUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(branchX + 400f, startY + stepY * 3 + 180f));
|
||||
SetNodeFieldValue(comboLeapUseNode, "Pattern", mobilityPattern, setFieldValueMethod);
|
||||
LinkTarget(comboLeapUseNode, targetVariable);
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, comboLeapBranch, "True", comboLeapUseNode);
|
||||
|
||||
// Sequence에 자식 연결
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, comboSequence, comboUseNode, comboLeapBranch);
|
||||
|
||||
// 메인 체인: comboBranch.True → Sequence
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, comboBranch, "True", comboSequence);
|
||||
}
|
||||
|
||||
// #5 Primary — 사거리 + 기본 패턴 준비 (모두 충족)
|
||||
@@ -338,12 +364,10 @@ namespace Colosseum.Editor
|
||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
|
||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(repeatNode), GetDefaultInputPort(downBranch));
|
||||
|
||||
// 각 Branch의 True FloatingPort → Action
|
||||
// 각 Branch의 True FloatingPort → Action (combo는 내부에서 Sequence로 연결됨)
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, downBranch, "True", downUseNode);
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, leapBranch, "True", leapUseNode);
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, signatureBranch, "True", signatureUseNode);
|
||||
if (comboBranch != null)
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, comboBranch, "True", comboUseNode);
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, primaryBranch, "True", primaryUseNode);
|
||||
ConnectBranch(graphAsset, connectEdgeMethod, utilityBranch, "True", utilityUseNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user