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:
File diff suppressed because it is too large
Load Diff
31
Assets/_Game/Data/Patterns/Data_Pattern_Drog_연타2강타-도약.asset
Normal file
31
Assets/_Game/Data/Patterns/Data_Pattern_Drog_연타2강타-도약.asset
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0ce956e0878565343974c31b8111c0c6, type: 3}
|
||||||
|
m_Name: Data_Pattern_Drog_연타2강타-도약
|
||||||
|
m_EditorClassIdentifier: Colosseum.Game::Colosseum.AI.BossPatternData
|
||||||
|
patternName: 연타2강타-도약
|
||||||
|
category: 1
|
||||||
|
isSignature: 0
|
||||||
|
isMelee: 1
|
||||||
|
targetMode: 0
|
||||||
|
steps:
|
||||||
|
- Type: 0
|
||||||
|
Skill: {fileID: 11400000, guid: 4f40629d4d334434285e8fdec3714536, type: 2}
|
||||||
|
Duration: 0
|
||||||
|
- Type: 0
|
||||||
|
Skill: {fileID: 11400000, guid: 3acbf1c5ec71bef4bb13f8534605d554, type: 2}
|
||||||
|
Duration: 0
|
||||||
|
- Type: 1
|
||||||
|
Skill: {fileID: 0}
|
||||||
|
Duration: 0.5
|
||||||
|
cooldown: 22
|
||||||
|
minPhase: 3
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d4e7f2a6b8c31095e1a3c5d7f9b2d4e8
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -23,5 +23,6 @@ MonoBehaviour:
|
|||||||
- Type: 0
|
- Type: 0
|
||||||
Skill: {fileID: 11400000, guid: 16321efbd1f2498458683bac7605b054, type: 2}
|
Skill: {fileID: 11400000, guid: 16321efbd1f2498458683bac7605b054, type: 2}
|
||||||
Duration: 0
|
Duration: 0
|
||||||
|
targetMode: 2
|
||||||
cooldown: 1
|
cooldown: 1
|
||||||
minPhase: 2
|
minPhase: 2
|
||||||
|
|||||||
@@ -2194,7 +2194,7 @@ MonoBehaviour:
|
|||||||
secondaryPattern: {fileID: 11400000, guid: 4a52d59d590b4eaa9ef92b7984eb08c7, type: 2}
|
secondaryPattern: {fileID: 11400000, guid: 4a52d59d590b4eaa9ef92b7984eb08c7, type: 2}
|
||||||
mobilityPattern: {fileID: 11400000, guid: 88e6cc7cab28baf4c8f8a742247000ec, type: 2}
|
mobilityPattern: {fileID: 11400000, guid: 88e6cc7cab28baf4c8f8a742247000ec, type: 2}
|
||||||
utilityPattern: {fileID: 11400000, guid: 9f7ab8078af64fd9a6ff4c9ce6aa9d3a, type: 2}
|
utilityPattern: {fileID: 11400000, guid: 9f7ab8078af64fd9a6ff4c9ce6aa9d3a, type: 2}
|
||||||
comboPattern: {fileID: 0}
|
comboPattern: {fileID: 11400000, guid: d4e7f2a6b8c31095e1a3c5d7f9b2d4e8, type: 2}
|
||||||
punishPattern: {fileID: 11400000, guid: fe5100f855d14c0faac44b6d4f2c771e, type: 2}
|
punishPattern: {fileID: 11400000, guid: fe5100f855d14c0faac44b6d4f2c771e, type: 2}
|
||||||
signaturePattern: {fileID: 11400000, guid: 5e732b41722c45288bb6234f3e3fa638, type: 2}
|
signaturePattern: {fileID: 11400000, guid: 5e732b41722c45288bb6234f3e3fa638, type: 2}
|
||||||
phase2HealthThreshold: 0.75
|
phase2HealthThreshold: 0.75
|
||||||
|
|||||||
@@ -230,13 +230,13 @@ namespace Colosseum.Editor
|
|||||||
|
|
||||||
const float branchX = -800f;
|
const float branchX = -800f;
|
||||||
const float truePortOffsetX = 203f;
|
const float truePortOffsetX = 203f;
|
||||||
const float truePortOffsetY = 110f;
|
const float truePortOffsetY = 120f;
|
||||||
const float falsePortOffsetX = -211f;
|
const float falsePortOffsetX = -211f;
|
||||||
const float falsePortOffsetY = 114f;
|
const float falsePortOffsetY = 124f;
|
||||||
const float actionOffsetX = 202f;
|
const float actionOffsetX = 202f;
|
||||||
const float actionOffsetY = 199f;
|
const float actionOffsetY = 219f;
|
||||||
const float startY = -800f;
|
const float startY = -800f;
|
||||||
const float stepY = 220f;
|
const float stepY = 320f;
|
||||||
|
|
||||||
// #1 Punish — 다운 추가타 (전제 조건: 다운된 대상이 반경 이내에 있어야 함)
|
// #1 Punish — 다운 추가타 (전제 조건: 다운된 대상이 반경 이내에 있어야 함)
|
||||||
object downBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY));
|
object downBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY));
|
||||||
@@ -267,17 +267,43 @@ namespace Colosseum.Editor
|
|||||||
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
||||||
LinkTarget(signatureUseNode, targetVariable);
|
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 comboBranch = null;
|
||||||
object comboUseNode = null;
|
object comboUseNode = null;
|
||||||
if (comboPattern != null)
|
if (comboPattern != null)
|
||||||
{
|
{
|
||||||
|
// 메인 체인용 Branch (콤보 준비 + 페이즈 조건)
|
||||||
comboBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 3));
|
comboBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 3));
|
||||||
AttachPatternReadyCondition(comboBranch, comboPattern, authoringAssembly);
|
AttachPatternReadyCondition(comboBranch, comboPattern, authoringAssembly);
|
||||||
AttachPhaseConditionIfNeeded(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);
|
SetNodeFieldValue(comboUseNode, "Pattern", comboPattern, setFieldValueMethod);
|
||||||
LinkTarget(comboUseNode, targetVariable);
|
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 — 사거리 + 기본 패턴 준비 (모두 충족)
|
// #5 Primary — 사거리 + 기본 패턴 준비 (모두 충족)
|
||||||
@@ -338,12 +364,10 @@ namespace Colosseum.Editor
|
|||||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
|
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
|
||||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(repeatNode), GetDefaultInputPort(downBranch));
|
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, downBranch, "True", downUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, leapBranch, "True", leapUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, leapBranch, "True", leapUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, signatureBranch, "True", signatureUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, signatureBranch, "True", signatureUseNode);
|
||||||
if (comboBranch != null)
|
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, comboBranch, "True", comboUseNode);
|
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, primaryBranch, "True", primaryUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, primaryBranch, "True", primaryUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, utilityBranch, "True", utilityUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, utilityBranch, "True", utilityUseNode);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user