refactor(enemy): 敌人专属子类改为零代码配置型行为组件

This commit is contained in:
2026-06-09 15:56:44 +08:00
parent 7781ac4755
commit ebf0c97320
22 changed files with 496 additions and 242 deletions

View File

@@ -414,6 +414,7 @@ GameObject:
- component: {fileID: 3801052615690156945}
- component: {fileID: 1497225151565698519}
- component: {fileID: 1137051351926306612}
- component: {fileID: 8183142527609344657}
m_Layer: 13
m_Name: ENM_YouZhi
m_TagString: Untagged
@@ -521,7 +522,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6255869283652534460}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d86a36c2999f88842a212d095749c349, type: 3}
m_Script: {fileID: 11500000, guid: 1a2dbfbcc31a4c34cbd3ac893f02e07d, type: 3}
m_Name:
m_EditorClassIdentifier:
_enemyId:
@@ -547,7 +548,6 @@ MonoBehaviour:
_dbg_LastKnownPos: {x: 0, y: 0}
_dbg_BtTickInterval: 0
_autoPlayPhaseAnimation: 1
_activateOnSpawn: 1
--- !u!114 &3136685549398515749
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -748,6 +748,20 @@ MonoBehaviour:
obstructLayer:
serializedVersion: 2
m_Bits: 0
--- !u!114 &8183142527609344657
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6255869283652534460}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3198979f0bd38e1429478e7937b280b3, type: 3}
m_Name:
m_EditorClassIdentifier:
_abilityId: e003_fall
_executeOnSpawn: 1
--- !u!1 &7519275599598288895
GameObject:
m_ObjectHideFlags: 0

View File

@@ -761,6 +761,7 @@ GameObject:
- component: {fileID: 9180313924888131203}
- component: {fileID: 1758362558550688781}
- component: {fileID: 1140989549255509988}
- component: {fileID: 4917575637238364831}
m_Layer: 13
m_Name: ENM_ZhiMu
m_TagString: Untagged
@@ -870,7 +871,7 @@ MonoBehaviour:
m_GameObject: {fileID: 7501196512915604413}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf8f8c7225dca9c42b5a451b177319b9, type: 3}
m_Script: {fileID: 11500000, guid: 1a2dbfbcc31a4c34cbd3ac893f02e07d, type: 3}
m_Name:
m_EditorClassIdentifier:
_enemyId:
@@ -896,20 +897,6 @@ MonoBehaviour:
_dbg_LastKnownPos: {x: 0, y: 0}
_dbg_BtTickInterval: 0
_autoPlayPhaseAnimation: 1
_deathPreClip:
_FadeDuration: 0.25
_Speed: 1
_Events:
_NormalizedTimes: []
_Callbacks: []
_Names: []
_Clip: {fileID: 0}
_NormalizedStartTime: NaN
_hurtBox: {fileID: 0}
_deathPreDuration: 3
references:
version: 2
RefIds: []
--- !u!114 &7254417954483924161
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1179,3 +1166,32 @@ MonoBehaviour:
obstructLayer:
serializedVersion: 2
m_Bits: 0
--- !u!114 &4917575637238364831
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7501196512915604413}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a4a8aad8881b4543a0918321e7efe3e, type: 3}
m_Name:
m_EditorClassIdentifier:
_deathPreClip:
_FadeDuration: 0.25
_Speed: 1
_Events:
_NormalizedTimes: []
_Callbacks: []
_Names: []
_Clip: {fileID: 0}
_NormalizedStartTime: NaN
_duration: 3
_hurtBoxesToDisable:
- {fileID: 6064615757515489567}
_stopBehaviorTree: 1
_stopMovement: 1
references:
version: 2
RefIds: []

View File

@@ -267,6 +267,8 @@ GameObject:
- component: {fileID: 7306072729481347792}
- component: {fileID: 6593689935047063830}
- component: {fileID: 7475404416877533072}
- component: {fileID: 8876688377798292022}
- component: {fileID: 1269485901178456362}
m_Layer: 13
m_Name: ENM_FeiZhi
m_TagString: Untagged
@@ -375,7 +377,7 @@ MonoBehaviour:
m_GameObject: {fileID: 3986905312391723074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f2460e8735a4dc5409fe6b0949bd65c0, type: 3}
m_Script: {fileID: 11500000, guid: 1a2dbfbcc31a4c34cbd3ac893f02e07d, type: 3}
m_Name:
m_EditorClassIdentifier:
_enemyId:
@@ -401,22 +403,6 @@ MonoBehaviour:
_dbg_LastKnownPos: {x: 0, y: 0}
_dbg_BtTickInterval: 0
_autoPlayPhaseAnimation: 1
_deathPreClip:
_FadeDuration: 0.25
_Speed: 1
_Events:
_NormalizedTimes: []
_Callbacks: []
_Names: []
_Clip: {fileID: 0}
_NormalizedStartTime: NaN
_hurtBox: {fileID: 0}
_deathPreDuration: 3
_spawnCount: 3
_spawnRadius: 1.5
references:
version: 2
RefIds: []
--- !u!114 &1218518018103485926
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -669,6 +655,51 @@ MonoBehaviour:
obstructLayer:
serializedVersion: 2
m_Bits: 0
--- !u!114 &8876688377798292022
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3986905312391723074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4a4a8aad8881b4543a0918321e7efe3e, type: 3}
m_Name:
m_EditorClassIdentifier:
_deathPreClip:
_FadeDuration: 0.25
_Speed: 1
_Events:
_NormalizedTimes: []
_Callbacks: []
_Names: []
_Clip: {fileID: 0}
_NormalizedStartTime: NaN
_duration: 3
_hurtBoxesToDisable:
- {fileID: 9041154183844542258}
_stopBehaviorTree: 1
_stopMovement: 1
references:
version: 2
RefIds: []
--- !u!114 &1269485901178456362
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3986905312391723074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fd9abafdb6bedcc4b8fd011bde9208b6, type: 3}
m_Name:
m_EditorClassIdentifier:
_payloadKey: spawn_e003
_poolKey: ENM_YouZhi
_count: 3
_radius: 1.5
--- !u!1 &5960285064422745315
GameObject:
m_ObjectHideFlags: 0