feat: 为召唤和死亡触发技能添加动画效果

- 在 Hero、Monster 和 HeroAtkSystem 中分发技能触发事件时,增加 triggerType 参数以区分召唤和死亡
- 修改 SCastSystem 的 forceCastTriggerSkill 方法,根据 triggerType 播放对应的准备动画(黄色表示召唤,死亡动画表示死亡)
- 调整 hnode.prefab 中按钮的布局和样式,移除特定精灵帧以使用默认样式
This commit is contained in:
walkpan
2026-04-05 22:49:01 +08:00
parent 8b4ccfd484
commit c054209025
16 changed files with 484 additions and 2449 deletions

View File

@@ -1,460 +0,0 @@
[
{
"__type__": "cc.Prefab",
"_name": "Btn",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "Btn",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "btn_large_orange",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.5,
"y": 0.4,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 4
},
"_contentSize": {
"__type__": "cc.Size",
"width": 216,
"height": 106
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "32K2Dv7GFLo5C3I93vwlA4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 6
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@3c9ae",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "84UBHGdD5K5pwHH/xHPJdv"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "12pgh5YidIzJQokhOGrMYU",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Label",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1073741824,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 49.576171875,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "84Ag0s0BpJpJkHkk/orDmF"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "label",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1evOHf4QlOqr4vCOCj1QKc"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "143Ez+pCBDuKgbef19Aeln",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "50yJWRtc1Nl6Swd/YuEIj6"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"clickEvents": [],
"_interactable": true,
"_transition": 0,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "e2bGXJ18VGC61P18szeioK"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -1,13 +0,0 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "15cb03dd-c2be-47d4-a30f-aef7745f5ceb",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "Btn"
}
}

View File

@@ -26,34 +26,31 @@
},
{
"__id__": 26
},
{
"__id__": 37
}
],
"_active": true,
"_components": [
{
"__id__": 37
},
{
"__id__": 39
},
{
"__id__": 41
},
{
"__id__": 43
},
{
"__id__": 45
},
{
"__id__": 47
},
{
"__id__": 49
},
{
"__id__": 51
},
{
"__id__": 53
},
{
"__id__": 55
}
],
"_prefab": {
"__id__": 57
"__id__": 49
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -634,118 +631,6 @@
"z": 1
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 38
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 37
},
"asset": {
"__uuid__": "02e38f62-860e-4bb9-86d9-a59f073e2881",
"__expectedType__": "cc.Prefab"
},
"fileId": "54R/aYBglLI4Jn5pm++Jx8",
"instance": {
"__id__": 39
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "83JAqLl/ZNzJIv+L012Q2q",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 40
},
{
"__id__": 42
},
{
"__id__": 43
},
{
"__id__": 44
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 41
},
"propertyPath": [
"_name"
],
"value": "plus"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"54R/aYBglLI4Jn5pm++Jx8"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 41
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 41
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 41
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -756,7 +641,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 46
"__id__": 38
},
"_contentSize": {
"__type__": "cc.Size",
@@ -784,7 +669,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 48
"__id__": 40
},
"anm": {
"__id__": 5
@@ -805,7 +690,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 50
"__id__": 42
},
"debugMode": false,
"_id": ""
@@ -824,7 +709,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 52
"__id__": 44
},
"enabledContactListener": true,
"bullet": false,
@@ -858,7 +743,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 54
"__id__": 46
},
"tag": 0,
"_group": 4,
@@ -892,7 +777,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 56
"__id__": 48
},
"playOnLoad": false,
"_clips": [],
@@ -915,9 +800,6 @@
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 37
},
{
"__id__": 26
},

View File

@@ -7,11 +7,11 @@
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 30,
"sample": 12,
"speed": 1,
"wrapMode": 1,
"enableTrsBlending": false,
"_duration": 0.16666666666666666,
"_duration": 0.4166666666666667,
"_hash": 500763545,
"_tracks": [
{
@@ -69,10 +69,10 @@
"__type__": "cc.ObjectCurve",
"_times": [
0,
0.03333333333333333,
0.06666666666666667,
0.1,
0.13333333333333333
0.08333333333333333,
0.16666666666666666,
0.25,
0.3333333333333333
],
"_values": [
{

View File

@@ -87,7 +87,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -35.811,
"y": -60,
"z": 0
},
"_lrot": {
@@ -99,8 +99,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.7,
"y": 0.7,
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,

View File

@@ -87,7 +87,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -35.811,
"y": -60,
"z": 0
},
"_lrot": {
@@ -99,8 +99,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.7,
"y": 0.7,
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
@@ -159,7 +159,7 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 173,
"g": 255,
"b": 0,
"a": 255
},
@@ -178,7 +178,7 @@
"_fillStart": 0.2,
"_fillRange": 1,
"_isTrimmedMode": true,
"_useGrayscale": true,
"_useGrayscale": false,
"_atlas": {
"__uuid__": "2423272e-e63b-4736-b15b-30b40cf98a23",
"__expectedType__": "cc.SpriteAtlas"