角色buff 动画控制交由 buffcomp

This commit is contained in:
2024-12-30 16:59:05 +08:00
parent ed12d4d428
commit a66e61c313
20 changed files with 606 additions and 400 deletions

View File

@@ -37,20 +37,17 @@
"__id__": 52
},
{
"__id__": 63
"__id__": 65
},
{
"__id__": 72
"__id__": 74
},
{
"__id__": 82
"__id__": 84
}
],
"_active": true,
"_components": [
{
"__id__": 91
},
{
"__id__": 93
},
@@ -62,10 +59,16 @@
},
{
"__id__": 99
},
{
"__id__": 101
},
{
"__id__": 103
}
],
"_prefab": {
"__id__": 101
"__id__": 105
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -906,6 +909,9 @@
},
{
"__id__": 62
},
{
"__id__": 63
}
],
"removedComponents": []
@@ -1008,6 +1014,22 @@
"z": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 64
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "cc.TargetInfo",
"localID": [
"dfDOq9MhxDoay0LMIRMSnQ"
]
},
{
"__type__": "cc.Node",
"_objFlags": 0,
@@ -1015,14 +1037,14 @@
"__id__": 1
},
"_prefab": {
"__id__": 64
"__id__": 66
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 63
"__id__": 65
},
"asset": {
"__uuid__": "5b4ca49e-0f12-4478-b56d-bf8198b36b90",
@@ -1030,7 +1052,7 @@
},
"fileId": "0d6ZXmA5dHkZxoGONDL2sE",
"instance": {
"__id__": 65
"__id__": 67
},
"targetOverrides": null
},
@@ -1043,20 +1065,20 @@
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 66
},
{
"__id__": 68
},
{
"__id__": 69
},
{
"__id__": 70
},
{
"__id__": 71
},
{
"__id__": 72
},
{
"__id__": 73
}
],
"removedComponents": []
@@ -1064,7 +1086,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 67
"__id__": 69
},
"propertyPath": [
"_name"
@@ -1080,7 +1102,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 67
"__id__": 69
},
"propertyPath": [
"_lpos"
@@ -1095,7 +1117,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 67
"__id__": 69
},
"propertyPath": [
"_lrot"
@@ -1111,7 +1133,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 67
"__id__": 69
},
"propertyPath": [
"_euler"
@@ -1126,7 +1148,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 67
"__id__": 69
},
"propertyPath": [
"_active"
@@ -1140,14 +1162,14 @@
"__id__": 1
},
"_prefab": {
"__id__": 73
"__id__": 75
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 72
"__id__": 74
},
"asset": {
"__uuid__": "ec11e9f5-3347-4d5e-8ed8-f98a6ac7963a",
@@ -1155,7 +1177,7 @@
},
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
"instance": {
"__id__": 74
"__id__": 76
},
"targetOverrides": null
},
@@ -1168,15 +1190,9 @@
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 75
},
{
"__id__": 77
},
{
"__id__": 78
},
{
"__id__": 79
},
@@ -1185,6 +1201,12 @@
},
{
"__id__": 81
},
{
"__id__": 82
},
{
"__id__": 83
}
],
"removedComponents": []
@@ -1192,7 +1214,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_name"
@@ -1208,7 +1230,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_lpos"
@@ -1223,7 +1245,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_lrot"
@@ -1239,7 +1261,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_euler"
@@ -1254,7 +1276,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_lscale"
@@ -1269,7 +1291,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 76
"__id__": 78
},
"propertyPath": [
"_active"
@@ -1283,14 +1305,14 @@
"__id__": 1
},
"_prefab": {
"__id__": 83
"__id__": 85
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 82
"__id__": 84
},
"asset": {
"__uuid__": "ae4493bd-cbcc-4392-921c-3e2b0fcd5338",
@@ -1298,7 +1320,7 @@
},
"fileId": "91yoyAQGNDm5ziI7NUChZ+",
"instance": {
"__id__": 84
"__id__": 86
},
"targetOverrides": null
},
@@ -1311,20 +1333,20 @@
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 85
},
{
"__id__": 87
},
{
"__id__": 88
},
{
"__id__": 89
},
{
"__id__": 90
},
{
"__id__": 91
},
{
"__id__": 92
}
],
"removedComponents": []
@@ -1332,7 +1354,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 86
"__id__": 88
},
"propertyPath": [
"_name"
@@ -1348,7 +1370,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 86
"__id__": 88
},
"propertyPath": [
"_lpos"
@@ -1363,7 +1385,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 86
"__id__": 88
},
"propertyPath": [
"_lrot"
@@ -1379,7 +1401,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 86
"__id__": 88
},
"propertyPath": [
"_euler"
@@ -1394,7 +1416,7 @@
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 86
"__id__": 88
},
"propertyPath": [
"_active"
@@ -1411,7 +1433,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 92
"__id__": 94
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1439,7 +1461,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 94
"__id__": 96
},
"enabledContactListener": true,
"bullet": true,
@@ -1473,7 +1495,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 96
"__id__": 98
},
"tag": 0,
"_group": 4,
@@ -1507,7 +1529,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 98
"__id__": 100
},
"anm": {
"__id__": 37
@@ -1528,7 +1550,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 100
"__id__": 102
},
"_id": ""
},
@@ -1536,6 +1558,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 104
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a8CP/9WcBLCoA9qiTrhje0"
},
{
"__type__": "cc.PrefabInfo",
"root": {
@@ -1549,13 +1589,13 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 82
"__id__": 84
},
{
"__id__": 72
"__id__": 74
},
{
"__id__": 63
"__id__": 65
},
{
"__id__": 52

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "21jLhujYtE3L53C6d12rZw"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "654wWWbWpMeYe/ywRBGTMP"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -65,10 +65,13 @@
},
{
"__id__": 107
},
{
"__id__": 109
}
],
"_prefab": {
"__id__": 109
"__id__": 111
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1707,6 +1710,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 110
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "10VrAD+6ZHFL/QSsD3uQDW"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "deHm1o9KpB17FL6fhKz71A"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 102
},
{
"__id__": 104
}
],
"_prefab": {
"__id__": 104
"__id__": 106
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1568,6 +1571,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 105
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "eeT0+fdzJLMq160CxwU2LG"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "5f5QAbqFdD3Ju5WYV7hPI8"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "71yWFptsBBdLhbljkpsiBt"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "5f5QAbqFdD3Ju5WYV7hPI8"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "2elZ4bl4FIB4b+pDLWapI5"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "5f5QAbqFdD3Ju5WYV7hPI8"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b8ibchQPNNBZ5E+NDTaDMb"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -62,10 +62,13 @@
},
{
"__id__": 99
},
{
"__id__": 101
}
],
"_prefab": {
"__id__": 101
"__id__": 103
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1536,6 +1539,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "ae2ywFEqlJ26Sq7z7AtGgk"
},
{
"__type__": "7eb34NR6XVEf78HCi5eAKLm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 102
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "cex4XP3BdLu4w/1NSQ5tWB"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -112,7 +112,7 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"x": 1.1,
"y": 1,
"z": 1
},
@@ -149,7 +149,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -29,
"x": -30,
"y": 0,
"z": 0
},
@@ -190,8 +190,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 58,
"height": 13
"width": 60,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -449,7 +449,7 @@
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@984ba",
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@2be5f",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
@@ -608,8 +608,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,
@@ -744,8 +744,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,
@@ -880,8 +880,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,
@@ -1016,8 +1016,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,
@@ -1152,8 +1152,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 0.8,
"y": 0.8,
"z": 1
},
"_mobility": 0,

View File

@@ -25,26 +25,26 @@
"__id__": 12
},
{
"__id__": 28
"__id__": 22
},
{
"__id__": 38
"__id__": 32
},
{
"__id__": 54
"__id__": 48
}
],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 58
},
{
"__id__": 66
"__id__": 60
}
],
"_prefab": {
"__id__": 68
"__id__": 62
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -190,8 +190,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 35.369140625,
"height": 39.8
"width": 37.369140625,
"height": 41.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -221,9 +221,9 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 121,
"g": 121,
"b": 121,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "10",
@@ -239,19 +239,19 @@
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_cacheMode": 1,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 1,
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
@@ -337,19 +337,16 @@
"_children": [
{
"__id__": 13
},
{
"__id__": 19
}
],
"_active": false,
"_components": [
{
"__id__": 25
"__id__": 19
}
],
"_prefab": {
"__id__": 27
"__id__": 21
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -444,8 +441,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 26.24609375,
"height": 54.4
"width": 52.4921875,
"height": 58.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -475,15 +472,15 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 22,
"g": 231,
"b": 39,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_string": "10",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_actualFontSize": 40,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
@@ -500,12 +497,12 @@
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"r": 82,
"g": 255,
"b": 255,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_outlineWidth": 4,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
@@ -539,165 +536,6 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "+",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
},
{
"__id__": 22
}
],
"_prefab": {
"__id__": 24
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -18.702999999999975,
"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__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"_contentSize": {
"__type__": "cc.Size",
"width": 15.6796875,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "87FEhNM7RMVqLclVqADNPz"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 23
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 13,
"g": 243,
"b": 59,
"a": 255
},
"_string": "+",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 20,
"_fontSize": 40,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"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": "edXhx12K5KqY9dBp17uu3z"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "bdzwPhf5tDxb3Sb9sEuEPx",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -708,7 +546,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 26
"__id__": 20
},
"_contentSize": {
"__type__": "cc.Size",
@@ -749,17 +587,17 @@
},
"_children": [
{
"__id__": 29
"__id__": 23
}
],
"_active": false,
"_components": [
{
"__id__": 35
"__id__": 29
}
],
"_prefab": {
"__id__": 37
"__id__": 31
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -796,20 +634,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 28
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 24
},
{
"__id__": 32
"__id__": 26
}
],
"_prefab": {
"__id__": 34
"__id__": 28
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -846,11 +684,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
"__id__": 23
},
"_enabled": true,
"__prefab": {
"__id__": 31
"__id__": 25
},
"_contentSize": {
"__type__": "cc.Size",
@@ -874,11 +712,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
"__id__": 23
},
"_enabled": true,
"__prefab": {
"__id__": 33
"__id__": 27
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -955,11 +793,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 28
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 36
"__id__": 30
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1000,20 +838,20 @@
},
"_children": [
{
"__id__": 39
"__id__": 33
},
{
"__id__": 45
"__id__": 39
}
],
"_active": false,
"_components": [
{
"__id__": 51
"__id__": 45
}
],
"_prefab": {
"__id__": 53
"__id__": 47
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1050,20 +888,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 38
"__id__": 32
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 34
},
{
"__id__": 42
"__id__": 36
}
],
"_prefab": {
"__id__": 44
"__id__": 38
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1100,11 +938,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 39
"__id__": 33
},
"_enabled": true,
"__prefab": {
"__id__": 41
"__id__": 35
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1128,11 +966,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 39
"__id__": 33
},
"_enabled": true,
"__prefab": {
"__id__": 43
"__id__": 37
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1140,8 +978,8 @@
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 0,
"b": 0,
"g": 255,
"b": 255,
"a": 255
},
"_string": "-10",
@@ -1157,7 +995,7 @@
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isBold": true,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
@@ -1165,11 +1003,11 @@
"_outlineColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_outlineWidth": 5,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
@@ -1209,20 +1047,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 38
"__id__": 32
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 46
"__id__": 40
},
{
"__id__": 48
"__id__": 42
}
],
"_prefab": {
"__id__": 50
"__id__": 44
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1259,11 +1097,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 45
"__id__": 39
},
"_enabled": true,
"__prefab": {
"__id__": 47
"__id__": 41
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1287,11 +1125,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 45
"__id__": 39
},
"_enabled": true,
"__prefab": {
"__id__": 49
"__id__": 43
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1368,11 +1206,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 38
"__id__": 32
},
"_enabled": true,
"__prefab": {
"__id__": 52
"__id__": 46
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1399,6 +1237,8 @@
"__id__": 0
},
"fileId": "20vKhpGcBEoKbUIhLvPmd1",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -1411,17 +1251,17 @@
},
"_children": [
{
"__id__": 55
"__id__": 49
}
],
"_active": false,
"_components": [
{
"__id__": 61
"__id__": 55
}
],
"_prefab": {
"__id__": 63
"__id__": 57
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1458,20 +1298,20 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 54
"__id__": 48
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 50
},
{
"__id__": 58
"__id__": 52
}
],
"_prefab": {
"__id__": 60
"__id__": 54
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1508,11 +1348,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 55
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 57
"__id__": 51
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1536,11 +1376,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 55
"__id__": 49
},
"_enabled": true,
"__prefab": {
"__id__": 59
"__id__": 53
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -1617,11 +1457,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 54
"__id__": 48
},
"_enabled": true,
"__prefab": {
"__id__": 62
"__id__": 56
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1662,7 +1502,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 65
"__id__": 59
},
"_contentSize": {
"__type__": "cc.Size",
@@ -1690,7 +1530,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 67
"__id__": 61
},
"_id": ""
},

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "4dc4b992-a57a-436f-9db7-48102aea8387",
"files": [],
"subMetas": {},
"userData": {}
}

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"ver": "1.0.1",
"importer": "ttf-font",
"imported": true,
"uuid": "f3fe241e-64e7-4f53-a4e4-734bf71b42bf",
"files": [
".json",
"Kenney Future Narrow.ttf"
],
"subMetas": {},
"userData": {}
}

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"ver": "1.0.1",
"importer": "ttf-font",
"imported": true,
"uuid": "e8d0427b-1682-4837-8391-20cd02ac0713",
"files": [
".json",
"Kenney Future.ttf"
],
"subMetas": {},
"userData": {}
}

View File

@@ -1,17 +1,170 @@
import { _decorator, Component, Node } from 'cc';
import { _decorator, Component, instantiate, Label, Node, Prefab, ProgressBar, v3 } from 'cc';
import { HeroViewComp } from './HeroViewComp';
import { oops } from 'db://oops-framework/core/Oops';
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { Tooltip } from '../skills/Tooltip';
const { ccclass, property } = _decorator;
@ccclass('BuffComp')
export class BuffComp extends Component {
heroView: any=null;
buff_node:any=null;
ap_node:any=null;
cd_node:any=null;
def_node:any=null;
hp_node:any=null;
crit_node:any=null;
ap_cd:number=0;
cd_cd:number=0;
def_cd:number=0;
hp_cd:number=0;
crit_cd:number=0;
s_index=0
speek_time:number=0;
start() {
this.heroView = this.node.getComponent(HeroViewComp);
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = false;
}
update(deltaTime: number) {
if(this.ap_cd > 0 ) this.ap_cd -= deltaTime;
if(this.ap_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active){
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").setSiblingIndex(0);
this.s_index--
if(this.s_index< 0) this.s_index=0
}
if(this.cd_cd > 0 ) this.cd_cd -= deltaTime;
if(this.cd_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active) {
this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").setSiblingIndex(0);
this.s_index--
if(this.s_index< 0) this.s_index=0
}
if(this.def_cd > 0 ) this.def_cd -= deltaTime;
if(this.def_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active){
this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("def").setSiblingIndex(0);
this.s_index--
if(this.s_index< 0) this.s_index=0
}
if(this.hp_cd > 0 ) this.hp_cd -= deltaTime;
if(this.hp_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active){
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").setSiblingIndex(0);
this.s_index--
if(this.s_index< 0) this.s_index=0
}
if(this.crit_cd > 0 ) this.crit_cd -= deltaTime;
if(this.crit_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active){
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = false;
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").setSiblingIndex(0);
this.s_index--
if(this.s_index< 0) this.s_index=0
}
this.hp_show()
this.in_speek(deltaTime)
if(this.heroView.shield > 0){
this.node.getChildByName("shielded").active=true
}else{
this.node.getChildByName("shielded").active=false
}
}
show_ap(t:number=2){
this.ap_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = true;
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").setSiblingIndex(this.s_index);
console.log("show_ap",this.node.getChildByName("top").getChildByName("buff").getChildByName("ap"))
this.s_index++
}
show_cd(t:number=2){
this.cd_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").active = true;
this.node.getChildByName("top").getChildByName("buff").getChildByName("cd").setSiblingIndex(this.s_index);
this.s_index++
}
show_def(t:number=2){
this.def_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("def").active = true;
this.node.getChildByName("top").getChildByName("buff").getChildByName("def").setSiblingIndex(this.s_index);
this.s_index++
}
show_hp(t:number=2){
this.hp_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = true;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").setSiblingIndex(this.s_index);
this.s_index++
}
show_crit(t:number=2){
this.crit_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = true;
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").setSiblingIndex(this.s_index);
this.s_index++
}
hp_show(){
let hp_progress= this.heroView.hp/this.heroView.rhp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
if(this.heroView.hp == this.heroView.rhp_max){
this.node.getChildByName("top").getChildByName("hp").active = false;
} else{
this.node.getChildByName("top").getChildByName("hp").active = true;
}
}
dead(){
var path = "game/skills/dead";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos = v3(this.node.position.x,this.node.position.y+30,this.node.position.z);
node.parent = this.node;
node.setPosition(pos);
}
in_atked() {
var path = "game/skills/atked";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos =v3(15,30);
node.setPosition(pos)
node.parent = this.node;
}
to_speek(words:string,time:number=0.5){
this.speek_time=0.5
this.node.getChildByName("tooltip").active=true
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = words
}
in_speek(dt: number){
if(this.speek_time <= 0){
return;
}
this.speek_time -= dt;
if(this.speek_time <= 0){
this.speek_time = 0;
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = "";
this.node.getChildByName("tooltip").active=false;
}
}
tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=90){
// console.log("tooltip",type);
let tip =ecs.getEntity<Tooltip>(Tooltip);
let pos = v3(0,0);
pos.y=pos.y+y;
tip.load(pos,type,value,s_uuid,this.node);
}
heathed(){
this.node.getChildByName("heathed").active=true
}
}

View File

@@ -22,13 +22,14 @@ import { Tooltip } from "../skills/Tooltip";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { TimerManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/TimerManager";
import { HeroSet } from "../common/config/heroSet";
import { BuffComp } from "./BuffComp";
const { ccclass, property } = _decorator;
/** 角色显示组件 */
@ccclass('HeroViewComp') // 定义为 Cocos Creator 组件
@ecs.register('HeroView', false) // 定义为 ECS 组件
export class HeroViewComp extends CCComp {
BUFFCOMP:any=null!;
enemy_pos:Vec3=null!;
enemy:any=null!;
@@ -127,7 +128,10 @@ export class HeroViewComp extends CCComp {
} /** 视图层逻辑代码分离演示 */
start () {
this.as.idle()
this.BUFFCOMP=this.node.getComponent(BuffComp);
/** 方向 */
this.node.setScale(this.scale,1);
this.node.getChildByName("top").setScale(this.scale,1);
@@ -218,7 +222,6 @@ export class HeroViewComp extends CCComp {
this.at += dt;
this.check_enemy_alive()
this.in_atk(dt);
this.hp_show()
this.move(dt);
this.check_mission_buf()
}
@@ -311,15 +314,6 @@ export class HeroViewComp extends CCComp {
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z);
}
hp_show(){
let hp_progress= this.hp/this.rhp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
if(this.hp == this.rhp_max){
this.node.getChildByName("top").getChildByName("hp").active = false;
} else{
this.node.getChildByName("top").getChildByName("hp").active = true;
}
}
skill_pos(){
return v3(0,35)
}
@@ -360,8 +354,8 @@ export class HeroViewComp extends CCComp {
if(skill.is_crit){
l_hp = l_hp * (150+skill.crit_add)/100
}
l_hp=-1*Math.ceil(l_hp)
this.hp_change(l_hp,skill.is_crit);
l_hp=Math.ceil(l_hp)
this.hp_less(l_hp,skill.is_crit);
}
//能量判断
check_power(){
@@ -389,7 +383,7 @@ export class HeroViewComp extends CCComp {
{
let i = RandomManager.instance.getRandomInt(0,100,3)
if(i < this.crit_max){
this.tooltip(5,"*会心一击*");
this.BUFFCOMP.tooltip(5,"*会心一击*");
this.crit_count += 1
this.exp_add(this.cexp) // 暴击经验
this.power_add(this.cpw)
@@ -409,7 +403,7 @@ export class HeroViewComp extends CCComp {
let i = RandomManager.instance.getRandomInt(0,100,3)
if(i < this.dodge_max){
// console.log("闪避触发: i="+i+":dodge="+dodge);
this.tooltip(5,"闪避");
this.BUFFCOMP.tooltip(5,"闪避");
this.exp_add(this.doexp) // 闪避经验
this.power_add(this.dopw)
this.dodge_count += 1
@@ -512,7 +506,7 @@ export class HeroViewComp extends CCComp {
handle_skill(skill:number){
this.as.max()
this.at = 0;
this.tooltip(3,SkillSet[skill].name,skill);
this.BUFFCOMP.tooltip(3,SkillSet[skill].name,skill);
switch (SkillSet[skill].tg) {
case 0: //自己
@@ -605,52 +599,30 @@ export class HeroViewComp extends CCComp {
}
to_speek(words:string,time:number=0.5){
this.speek_time=0.5
this.node.getChildByName("tooltip").active=true
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = words
}
in_speek(dt: number){
if(this.speek_time <= 0){
return;
}
this.speek_time -= dt;
if(this.speek_time <= 0){
this.speek_time = 0;
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = "";
this.node.getChildByName("tooltip").active=false;
}
}
heathed(){
this.node.getChildByName("heathed").active=true
}
hp_max_add(){
console.log("hp_max_add 动画");
}
add_hp(hp: number=0){
this.heathed();
this.BUFFCOMP.heathed();
this.hp+=hp;
if(this.hp > this.rhp_max){
this.hp = this.rhp_max;
}
this.tooltip(2,hp.toFixed(0));
this.BUFFCOMP.tooltip(2,hp.toFixed(0));
}
add_hp_max(hp: number=0){
this.hp_max_add()
this.hp += hp/100*this.hp_max;
}
hp_change(hp: number,is_crit:boolean=false){
hp_less(hp: number,is_crit:boolean=false){
if(this.is_dead){
return;
}
this.hp += hp;
this.hp -= hp;
if(is_crit){
this.tooltip(4,hp.toFixed(0),250);
this.BUFFCOMP.tooltip(4,hp.toFixed(0),250);
}else{
this.tooltip(1,hp.toFixed(0),250);
this.BUFFCOMP.tooltip(1,hp.toFixed(0),250);
}
if(this.hp > this.rhp_max){
@@ -692,18 +664,7 @@ export class HeroViewComp extends CCComp {
add_shield(shield:number){
this.shield =shield
console.log("shield:",shield);
if(this.shield > 0){
this.node.getChildByName("shielded").active=true
}
}
tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=90){
// console.log("tooltip",type);
let tip =ecs.getEntity<Tooltip>(Tooltip);
let pos = v3(0,0);
pos.y=pos.y+y;
tip.load(pos,type,value,s_uuid,this.node);
}
/** 静止时间 */
in_stop (dt: number) {
if(this.stop_cd > 0){
@@ -716,24 +677,14 @@ export class HeroViewComp extends CCComp {
}
in_atked() {
var path = "game/skills/atked";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos =v3(15,30);
node.setPosition(pos)
node.parent = this.node;
this.BUFFCOMP.in_atked()
// this.as.atked();
this.atked_count++;
this.exp_add(this.uaexp)
this.power_add(this.uapw)
}
dead(){
var path = "game/skills/dead";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos = v3(this.node.position.x,this.node.position.y+30,this.node.position.z);
node.parent = this.node;
node.setPosition(pos);
this.BUFFCOMP.dead()
this.exp_add(this.dexp)
this.power_add(this.dpw)
}

View File

@@ -31,7 +31,7 @@ export class TooltipCom extends CCComp {
this.node.getChildByName("loss_life").active=true;
tween(this.node).to(
this.alive_time,
{position:v3(this.node.position.x-10,this.node.position.y+20), },
{position:v3(this.node.position.x,this.node.position.y+20), },
{
onComplete:()=>{ this.ent.destroy()},
easing:"linear"
@@ -69,7 +69,7 @@ export class TooltipCom extends CCComp {
this.node.getChildByName("bloss").active=true;
tween(this.node).to(
this.alive_time,
{position:v3(this.node.position.x-10,this.node.position.y+20), },
{position:v3(this.node.position.x,this.node.position.y+20), },
{
onComplete:()=>{ this.ent.destroy()},
easing:"linear"