diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 0188facd..39e9faa8 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -22,23 +22,23 @@ "__id__": 2 }, { - "__id__": 26 + "__id__": 42 }, { - "__id__": 66 + "__id__": 82 }, { - "__id__": 106 + "__id__": 122 } ], "_active": true, "_components": [ { - "__id__": 112 + "__id__": 128 } ], "_prefab": { - "__id__": 114 + "__id__": 130 }, "_lpos": { "__type__": "cc.Vec3", @@ -82,23 +82,26 @@ "__id__": 3 }, { - "__id__": 11 + "__id__": 19 + }, + { + "__id__": 27 } ], "_active": true, "_components": [ { - "__id__": 19 + "__id__": 35 }, { - "__id__": 21 + "__id__": 37 }, { - "__id__": 23 + "__id__": 39 } ], "_prefab": { - "__id__": 25 + "__id__": 41 }, "_lpos": { "__type__": "cc.Vec3", @@ -131,27 +134,84 @@ }, { "__type__": "cc.Node", - "_name": "Bar", + "_name": "mpb", "_objFlags": 0, "__editorExtras__": {}, "_parent": { "__id__": 2 }, + "_children": [ + { + "__id__": 4 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + }, + { + "__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": 1, + "_euler": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Bar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 3 + }, "_children": [], "_active": true, "_components": [ { - "__id__": 4 + "__id__": 5 }, { - "__id__": 6 + "__id__": 7 }, { - "__id__": 8 + "__id__": 9 } ], "_prefab": { - "__id__": 10 + "__id__": 11 }, "_lpos": { "__type__": "cc.Vec3", @@ -182,6 +242,131 @@ }, "_id": "" }, + { + "__type__": "cc.UITransform", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 6 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 72, + "height": 10 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "0bZpCOAm1NPZGL38CxgFPK" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 8 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_spriteFrame": { + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@46c83", + "__expectedType__": "cc.SpriteFrame" + }, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 1, + "_isTrimmedMode": true, + "_useGrayscale": false, + "_atlas": { + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73", + "__expectedType__": "cc.SpriteAtlas" + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "02aCOWnjpOLqFJPimXYMBQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 4 + }, + "_enabled": true, + "__prefab": { + "__id__": 10 + }, + "_alignFlags": 45, + "_target": null, + "_left": -1, + "_right": -1, + "_top": 0, + "_bottom": 0, + "_horizontalCenter": 0, + "_verticalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 56, + "_originalHeight": 13, + "_alignMode": 2, + "_lockFlags": 0, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "58vMs23+5BIYtYerah4Qpm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "91uy3HkphBobSPi9EoJ26y", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, { "__type__": "cc.UITransform", "_name": "", @@ -192,7 +377,168 @@ }, "_enabled": true, "__prefab": { - "__id__": 5 + "__id__": 13 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 70, + "height": 10 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "228cRr/tVN8oKk0dUbGOJc" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": false, + "__prefab": { + "__id__": 15 + }, + "_customMaterial": null, + "_srcBlendFactor": 2, + "_dstBlendFactor": 4, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_spriteFrame": null, + "_type": 1, + "_fillType": 0, + "_sizeMode": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_useGrayscale": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "ceESudvsVNA68Sxdpi/DZ8" + }, + { + "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 3 + }, + "_enabled": true, + "__prefab": { + "__id__": 17 + }, + "_barSprite": { + "__id__": 7 + }, + "_mode": 0, + "_totalLength": 72, + "_progress": 1, + "_reverse": false, + "_id": "" + }, + { + "__type__": "cc.CompPrefabInfo", + "fileId": "01TDjfPVVNoojLoMw3pz3/" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "45TeSLP61JhLWkk0fAcwWZ", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.Node", + "_name": "Bar", + "_objFlags": 0, + "__editorExtras__": {}, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 26 + }, + "_lpos": { + "__type__": "cc.Vec3", + "x": -36, + "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": 1, + "_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", @@ -216,24 +562,24 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 3 + "__id__": 19 }, "_enabled": true, "__prefab": { - "__id__": 7 + "__id__": 23 }, "_customMaterial": null, "_srcBlendFactor": 2, "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 62, + "g": 175, + "b": 250, "a": 255 }, "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@63670", + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@46c83", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -264,11 +610,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 3 + "__id__": 19 }, "_enabled": true, "__prefab": { - "__id__": 9 + "__id__": 25 }, "_alignFlags": 45, "_target": null, @@ -319,17 +665,17 @@ "_active": true, "_components": [ { - "__id__": 12 + "__id__": 28 }, { - "__id__": 14 + "__id__": 30 }, { - "__id__": 16 + "__id__": 32 } ], "_prefab": { - "__id__": 18 + "__id__": 34 }, "_lpos": { "__type__": "cc.Vec3", @@ -366,11 +712,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 11 + "__id__": 27 }, "_enabled": true, "__prefab": { - "__id__": 13 + "__id__": 29 }, "_contentSize": { "__type__": "cc.Size", @@ -394,11 +740,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 11 + "__id__": 27 }, "_enabled": true, "__prefab": { - "__id__": 15 + "__id__": 31 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -442,11 +788,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 11 + "__id__": 27 }, "_enabled": true, "__prefab": { - "__id__": 17 + "__id__": 33 }, "_alignFlags": 45, "_target": null, @@ -495,7 +841,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 20 + "__id__": 36 }, "_contentSize": { "__type__": "cc.Size", @@ -523,16 +869,16 @@ }, "_enabled": true, "__prefab": { - "__id__": 22 + "__id__": 38 }, "_customMaterial": null, "_srcBlendFactor": 2, "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, + "r": 0, + "g": 0, + "b": 0, "a": 255 }, "_spriteFrame": { @@ -571,10 +917,10 @@ }, "_enabled": true, "__prefab": { - "__id__": 24 + "__id__": 40 }, "_barSprite": { - "__id__": 6 + "__id__": 22 }, "_mode": 0, "_totalLength": 72, @@ -608,30 +954,30 @@ "__id__": 1 }, "_children": [ - { - "__id__": 27 - }, { "__id__": 43 }, { - "__id__": 51 + "__id__": 59 + }, + { + "__id__": 67 } ], "_active": true, "_components": [ { - "__id__": 59 + "__id__": 75 }, { - "__id__": 61 + "__id__": 77 }, { - "__id__": 63 + "__id__": 79 } ], "_prefab": { - "__id__": 65 + "__id__": 81 }, "_lpos": { "__type__": "cc.Vec3", @@ -668,27 +1014,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 26 + "__id__": 42 }, "_children": [ { - "__id__": 28 + "__id__": 44 } ], "_active": true, "_components": [ { - "__id__": 36 + "__id__": 52 }, { - "__id__": 38 + "__id__": 54 }, { - "__id__": 40 + "__id__": 56 } ], "_prefab": { - "__id__": 42 + "__id__": 58 }, "_lpos": { "__type__": "cc.Vec3", @@ -725,23 +1071,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 27 + "__id__": 43 }, "_children": [], "_active": true, "_components": [ { - "__id__": 29 + "__id__": 45 }, { - "__id__": 31 + "__id__": 47 }, { - "__id__": 33 + "__id__": 49 } ], "_prefab": { - "__id__": 35 + "__id__": 51 }, "_lpos": { "__type__": "cc.Vec3", @@ -778,11 +1124,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 28 + "__id__": 44 }, "_enabled": true, "__prefab": { - "__id__": 30 + "__id__": 46 }, "_contentSize": { "__type__": "cc.Size", @@ -806,11 +1152,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 28 + "__id__": 44 }, "_enabled": true, "__prefab": { - "__id__": 32 + "__id__": 48 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -854,11 +1200,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 28 + "__id__": 44 }, "_enabled": true, "__prefab": { - "__id__": 34 + "__id__": 50 }, "_alignFlags": 45, "_target": null, @@ -903,11 +1249,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 27 + "__id__": 43 }, "_enabled": true, "__prefab": { - "__id__": 37 + "__id__": 53 }, "_contentSize": { "__type__": "cc.Size", @@ -931,11 +1277,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 27 + "__id__": 43 }, "_enabled": false, "__prefab": { - "__id__": 39 + "__id__": 55 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -973,14 +1319,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 27 + "__id__": 43 }, "_enabled": true, "__prefab": { - "__id__": 41 + "__id__": 57 }, "_barSprite": { - "__id__": 31 + "__id__": 47 }, "_mode": 0, "_totalLength": 72, @@ -1011,23 +1357,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 26 + "__id__": 42 }, "_children": [], "_active": true, "_components": [ { - "__id__": 44 + "__id__": 60 }, { - "__id__": 46 + "__id__": 62 }, { - "__id__": 48 + "__id__": 64 } ], "_prefab": { - "__id__": 50 + "__id__": 66 }, "_lpos": { "__type__": "cc.Vec3", @@ -1064,11 +1410,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 43 + "__id__": 59 }, "_enabled": true, "__prefab": { - "__id__": 45 + "__id__": 61 }, "_contentSize": { "__type__": "cc.Size", @@ -1092,24 +1438,24 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 43 + "__id__": 59 }, "_enabled": true, "__prefab": { - "__id__": 47 + "__id__": 63 }, "_customMaterial": null, "_srcBlendFactor": 2, "_dstBlendFactor": 4, "_color": { "__type__": "cc.Color", - "r": 0, - "g": 163, + "r": 255, + "g": 255, "b": 255, "a": 255 }, "_spriteFrame": { - "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@46c83", + "__uuid__": "cb93c900-b440-4571-91d1-7da1636e3d73@40c7c", "__expectedType__": "cc.SpriteFrame" }, "_type": 1, @@ -1140,11 +1486,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 43 + "__id__": 59 }, "_enabled": true, "__prefab": { - "__id__": 49 + "__id__": 65 }, "_alignFlags": 45, "_target": null, @@ -1189,23 +1535,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 26 + "__id__": 42 }, "_children": [], "_active": true, "_components": [ { - "__id__": 52 + "__id__": 68 }, { - "__id__": 54 + "__id__": 70 }, { - "__id__": 56 + "__id__": 72 } ], "_prefab": { - "__id__": 58 + "__id__": 74 }, "_lpos": { "__type__": "cc.Vec3", @@ -1242,11 +1588,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 51 + "__id__": 67 }, "_enabled": true, "__prefab": { - "__id__": 53 + "__id__": 69 }, "_contentSize": { "__type__": "cc.Size", @@ -1270,11 +1616,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 51 + "__id__": 67 }, "_enabled": true, "__prefab": { - "__id__": 55 + "__id__": 71 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1318,11 +1664,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 51 + "__id__": 67 }, "_enabled": true, "__prefab": { - "__id__": 57 + "__id__": 73 }, "_alignFlags": 45, "_target": null, @@ -1367,11 +1713,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 26 + "__id__": 42 }, "_enabled": true, "__prefab": { - "__id__": 60 + "__id__": 76 }, "_contentSize": { "__type__": "cc.Size", @@ -1395,11 +1741,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 26 + "__id__": 42 }, "_enabled": true, "__prefab": { - "__id__": 62 + "__id__": 78 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1443,14 +1789,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 26 + "__id__": 42 }, "_enabled": true, "__prefab": { - "__id__": 64 + "__id__": 80 }, "_barSprite": { - "__id__": 46 + "__id__": 62 }, "_mode": 0, "_totalLength": 72, @@ -1484,30 +1830,30 @@ "__id__": 1 }, "_children": [ - { - "__id__": 67 - }, { "__id__": 83 }, { - "__id__": 91 + "__id__": 99 + }, + { + "__id__": 107 } ], "_active": true, "_components": [ { - "__id__": 99 + "__id__": 115 }, { - "__id__": 101 + "__id__": 117 }, { - "__id__": 103 + "__id__": 119 } ], "_prefab": { - "__id__": 105 + "__id__": 121 }, "_lpos": { "__type__": "cc.Vec3", @@ -1544,27 +1890,27 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 82 }, "_children": [ { - "__id__": 68 + "__id__": 84 } ], "_active": true, "_components": [ { - "__id__": 76 + "__id__": 92 }, { - "__id__": 78 + "__id__": 94 }, { - "__id__": 80 + "__id__": 96 } ], "_prefab": { - "__id__": 82 + "__id__": 98 }, "_lpos": { "__type__": "cc.Vec3", @@ -1601,23 +1947,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 67 + "__id__": 83 }, "_children": [], "_active": true, "_components": [ { - "__id__": 69 + "__id__": 85 }, { - "__id__": 71 + "__id__": 87 }, { - "__id__": 73 + "__id__": 89 } ], "_prefab": { - "__id__": 75 + "__id__": 91 }, "_lpos": { "__type__": "cc.Vec3", @@ -1654,11 +2000,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 84 }, "_enabled": true, "__prefab": { - "__id__": 70 + "__id__": 86 }, "_contentSize": { "__type__": "cc.Size", @@ -1682,11 +2028,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 84 }, "_enabled": true, "__prefab": { - "__id__": 72 + "__id__": 88 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1730,11 +2076,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 68 + "__id__": 84 }, "_enabled": true, "__prefab": { - "__id__": 74 + "__id__": 90 }, "_alignFlags": 45, "_target": null, @@ -1779,11 +2125,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 83 }, "_enabled": true, "__prefab": { - "__id__": 77 + "__id__": 93 }, "_contentSize": { "__type__": "cc.Size", @@ -1807,11 +2153,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 83 }, "_enabled": true, "__prefab": { - "__id__": 79 + "__id__": 95 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -1852,14 +2198,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 67 + "__id__": 83 }, "_enabled": true, "__prefab": { - "__id__": 81 + "__id__": 97 }, "_barSprite": { - "__id__": 71 + "__id__": 87 }, "_mode": 0, "_totalLength": 72, @@ -1890,23 +2236,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 84 + "__id__": 100 }, { - "__id__": 86 + "__id__": 102 }, { - "__id__": 88 + "__id__": 104 } ], "_prefab": { - "__id__": 90 + "__id__": 106 }, "_lpos": { "__type__": "cc.Vec3", @@ -1943,11 +2289,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 83 + "__id__": 99 }, "_enabled": true, "__prefab": { - "__id__": 85 + "__id__": 101 }, "_contentSize": { "__type__": "cc.Size", @@ -1971,11 +2317,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 83 + "__id__": 99 }, "_enabled": true, "__prefab": { - "__id__": 87 + "__id__": 103 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2019,11 +2365,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 83 + "__id__": 99 }, "_enabled": true, "__prefab": { - "__id__": 89 + "__id__": 105 }, "_alignFlags": 45, "_target": null, @@ -2068,23 +2414,23 @@ "_objFlags": 0, "__editorExtras__": {}, "_parent": { - "__id__": 66 + "__id__": 82 }, "_children": [], "_active": true, "_components": [ { - "__id__": 92 + "__id__": 108 }, { - "__id__": 94 + "__id__": 110 }, { - "__id__": 96 + "__id__": 112 } ], "_prefab": { - "__id__": 98 + "__id__": 114 }, "_lpos": { "__type__": "cc.Vec3", @@ -2121,11 +2467,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 91 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 93 + "__id__": 109 }, "_contentSize": { "__type__": "cc.Size", @@ -2149,11 +2495,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 91 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 95 + "__id__": 111 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2197,11 +2543,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 91 + "__id__": 107 }, "_enabled": true, "__prefab": { - "__id__": 97 + "__id__": 113 }, "_alignFlags": 45, "_target": null, @@ -2246,11 +2592,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 66 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 100 + "__id__": 116 }, "_contentSize": { "__type__": "cc.Size", @@ -2274,11 +2620,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 66 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 102 + "__id__": 118 }, "_customMaterial": null, "_srcBlendFactor": 2, @@ -2322,14 +2668,14 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 66 + "__id__": 82 }, "_enabled": true, "__prefab": { - "__id__": 104 + "__id__": 120 }, "_barSprite": { - "__id__": 86 + "__id__": 102 }, "_mode": 0, "_totalLength": 72, @@ -2366,14 +2712,14 @@ "_active": true, "_components": [ { - "__id__": 107 + "__id__": 123 }, { - "__id__": 109 + "__id__": 125 } ], "_prefab": { - "__id__": 111 + "__id__": 127 }, "_lpos": { "__type__": "cc.Vec3", @@ -2410,11 +2756,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 106 + "__id__": 122 }, "_enabled": true, "__prefab": { - "__id__": 108 + "__id__": 124 }, "_contentSize": { "__type__": "cc.Size", @@ -2438,11 +2784,11 @@ "_objFlags": 0, "__editorExtras__": {}, "node": { - "__id__": 106 + "__id__": 122 }, "_enabled": false, "__prefab": { - "__id__": 110 + "__id__": 126 }, "_resizeMode": 2, "_layoutType": 3, @@ -2493,7 +2839,7 @@ }, "_enabled": true, "__prefab": { - "__id__": 113 + "__id__": 129 }, "_contentSize": { "__type__": "cc.Size", diff --git a/assets/resources/game/skill/atk/atk_fires.prefab b/assets/resources/game/skill/atk/atk_fires.prefab index f78a5114..49019fb9 100644 --- a/assets/resources/game/skill/atk/atk_fires.prefab +++ b/assets/resources/game/skill/atk/atk_fires.prefab @@ -312,11 +312,15 @@ "__expectedType__": "cc.Prefab" }, "hasReady": true, - "ReadyTime": 0.1, + "ReadyLoop": true, + "SkillTime": 5, + "ReadyTime": 0.2, "runType": 0, "ready_y": 200, - "atk_x": 10, - "atk_y": 40, + "atk_x": 0, + "atk_y": 0, + "s_count": 5, + "s_interval": 0.2, "_id": "" }, { diff --git a/assets/resources/game/skill/atk/atk_s1.prefab b/assets/resources/game/skill/atk/atk_s1.prefab index 07961b92..e0d8c178 100644 --- a/assets/resources/game/skill/atk/atk_s1.prefab +++ b/assets/resources/game/skill/atk/atk_s1.prefab @@ -311,12 +311,16 @@ "__uuid__": "551c634e-b486-4ff5-a302-279e365751ee", "__expectedType__": "cc.Prefab" }, - "runType": 2, "hasReady": false, + "ReadyLoop": false, + "SkillTime": 1, "ReadyTime": 0.1, + "runType": 2, "ready_y": 0, "atk_x": 10, "atk_y": 0, + "s_count": 1, + "s_interval": 0, "_id": "" }, { @@ -333,6 +337,7 @@ }, "fileId": "c46/YsCPVOJYA4mWEpNYRx", "instance": null, + "targetOverrides": null, "nestedPrefabInstanceRoots": [ { "__id__": 2 diff --git a/assets/resources/game/skill/prefab/atk_s_1.prefab b/assets/resources/game/skill/prefab/atk_s_1.prefab index 5079abd3..9b9a9027 100644 --- a/assets/resources/game/skill/prefab/atk_s_1.prefab +++ b/assets/resources/game/skill/prefab/atk_s_1.prefab @@ -32,13 +32,10 @@ }, { "__id__": 16 - }, - { - "__id__": 18 } ], "_prefab": { - "__id__": 20 + "__id__": 18 }, "_lpos": { "__type__": "cc.Vec3", @@ -359,24 +356,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "157f8YWOhK6pBg6CBgHHww" }, - { - "__type__": "b1d8e1ZA0dLtqufhidnFK/K", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 19 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "eeypCqftdF9bW7NF55WalQ" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/skill/prefab/atk_s_2.prefab b/assets/resources/game/skill/prefab/atk_s_2.prefab index 455e8f4c..34e26e8a 100644 --- a/assets/resources/game/skill/prefab/atk_s_2.prefab +++ b/assets/resources/game/skill/prefab/atk_s_2.prefab @@ -32,13 +32,10 @@ }, { "__id__": 16 - }, - { - "__id__": 18 } ], "_prefab": { - "__id__": 20 + "__id__": 18 }, "_lpos": { "__type__": "cc.Vec3", @@ -359,24 +356,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "157f8YWOhK6pBg6CBgHHww" }, - { - "__type__": "b1d8e1ZA0dLtqufhidnFK/K", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 19 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "eeypCqftdF9bW7NF55WalQ" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/skill/prefab/atk_s_3.prefab b/assets/resources/game/skill/prefab/atk_s_3.prefab index 8ac2122b..ccd22076 100644 --- a/assets/resources/game/skill/prefab/atk_s_3.prefab +++ b/assets/resources/game/skill/prefab/atk_s_3.prefab @@ -32,13 +32,10 @@ }, { "__id__": 16 - }, - { - "__id__": 18 } ], "_prefab": { - "__id__": 20 + "__id__": 18 }, "_lpos": { "__type__": "cc.Vec3", @@ -359,24 +356,6 @@ "__type__": "cc.CompPrefabInfo", "fileId": "157f8YWOhK6pBg6CBgHHww" }, - { - "__type__": "b1d8e1ZA0dLtqufhidnFK/K", - "_name": "", - "_objFlags": 0, - "__editorExtras__": {}, - "node": { - "__id__": 1 - }, - "_enabled": true, - "__prefab": { - "__id__": 19 - }, - "_id": "" - }, - { - "__type__": "cc.CompPrefabInfo", - "fileId": "eeypCqftdF9bW7NF55WalQ" - }, { "__type__": "cc.PrefabInfo", "root": { diff --git a/assets/resources/game/skills/anm/atk01.anim b/assets/resources/game/skills/anm/atk01.anim index 6c170e24..9e200439 100644 --- a/assets/resources/game/skills/anm/atk01.anim +++ b/assets/resources/game/skills/anm/atk01.anim @@ -7,11 +7,11 @@ "embeddedPlayerGroups": [] }, "_native": "", - "sample": 60, + "sample": 30, "speed": 1, "wrapMode": 1, "enableTrsBlending": false, - "_duration": 0.05, + "_duration": 0.1, "_hash": 500763545, "_tracks": [ { @@ -24,12 +24,12 @@ "_exoticAnimation": null, "_events": [ { - "frame": 0.03333333333333333, + "frame": 0.06666666666666667, "func": "", "params": [] }, { - "frame": 0.03333333333333333, + "frame": 0.06666666666666667, "func": "atk", "params": [] } @@ -88,7 +88,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.05000000074505806 + 0.1 ], "_values": [ { @@ -101,9 +101,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -115,9 +113,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -133,7 +129,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.05000000074505806 + 0.1 ], "_values": [ { @@ -146,9 +142,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -160,9 +154,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -178,7 +170,7 @@ "__type__": "cc.RealCurve", "_times": [ 0, - 0.05000000074505806 + 0.1 ], "_values": [ { @@ -191,9 +183,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -205,9 +195,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -279,8 +267,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.03333333507180214, - 0.05000000074505806 + 0.06666666666666667, + 0.1 ], "_values": [ { @@ -293,9 +281,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -307,9 +293,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -324,8 +308,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.03333333507180214, - 0.05000000074505806 + 0.06666666666666667, + 0.1 ], "_values": [ { @@ -338,9 +322,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -352,9 +334,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -369,8 +349,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.03333333507180214, - 0.05000000074505806 + 0.06666666666666667, + 0.1 ], "_values": [ { @@ -383,9 +363,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -397,9 +375,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, @@ -414,8 +390,8 @@ { "__type__": "cc.RealCurve", "_times": [ - 0.03333333507180214, - 0.05000000074505806 + 0.06666666666666667, + 0.1 ], "_values": [ { @@ -428,9 +404,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null }, { "__type__": "cc.RealKeyframeValue", @@ -442,9 +416,7 @@ "leftTangent": 0, "leftTangentWeight": 1, "easingMethod": 0, - "__editorExtras__": { - "tangentMode": 0 - } + "__editorExtras__": null } ], "preExtrapolation": 1, diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 664ee929..89759ead 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -148,6 +148,8 @@ export enum Attrs { SHIELD_UP = 28, //护盾效果提升 BURN = 29, //攻击带易伤 DEBURN = 30, //被攻击易伤 + PUNCTURE=31, // 穿刺次数 + PUNCTURE_DMG=32, //穿刺伤害加成 } @@ -191,6 +193,7 @@ export const AttrsType: Record = { [Attrs.DIS]: BType.VALUE, // 攻击距离 - 数值型 [Attrs.BURN]: BType.VALUE, // 易伤 - 数值型 [Attrs.DEBURN]: BType.VALUE, // 被攻击易伤 - 数值型 + [Attrs.PUNCTURE]: BType.VALUE, // 穿刺次数 - 数值型 // ========== 百分比型属性 ========== [Attrs.CRITICAL]: BType.RATIO, // 暴击率 - 百分比型 @@ -214,6 +217,7 @@ export const AttrsType: Record = { [Attrs.DBUFF_UP]: BType.RATIO, // debuff效果提升 - 百分比型 [Attrs.SPEED]: BType.RATIO, // 移动速度加成 - 百分比型 [Attrs.SHIELD_UP]: BType.RATIO, // 护盾效果提升 - 百分比型 + [Attrs.PUNCTURE_DMG]: BType.RATIO, }; /** @@ -384,7 +388,7 @@ export const SkillSet: Record = { }, 6005: { uuid:6005,name:"火球术",sp_name:"atk_fires",AtkedType:AtkedType.fire,path:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single, - ap:100,cd:5,in:1,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:10,with:90, + ap:100,cd:5,in:1,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:20,with:90, buffs:[],debuffs:[],info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧" }, 6006: { diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 91dc4c3a..e6d15ecc 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -143,15 +143,15 @@ export const HeroInfo: Record = { //怪物 5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:25,mp:100,map:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6005], + type:HType.warrior,lv:1,hp:25,mp:100,map:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6005], buff:[],debuff:[],info:"普通怪物-战士型"}, 5202:{uuid:5202,name:"兽人刺客",path:"mo1", fac:FacSet.MON, kind:1, - type:HType.remote,lv:1,hp:20,mp:100,map:100,def:5,ap:5,dis:350,cd:1,speed:100,skills:[6001,6005], + type:HType.remote,lv:1,hp:20,mp:100,map:100,def:5,ap:5,dis:350,cd:1,speed:100,skills:[6005], buff:[],debuff:[],info:"普通怪物-战士型"}, 5203:{uuid:5203,name:"兽人护卫",path:"mo3", fac:FacSet.MON, kind:1, - type:HType.warrior,lv:1,hp:25,mp:100,map:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6001,6005], + type:HType.warrior,lv:1,hp:25,mp:100,map:100,def:5,ap:5,dis:90,cd:2,speed:100,skills:[6005], buff:[],debuff:[],info:"普通怪物-战士型"}, // 5204:{uuid:5204,name:"石卫", path:"mo1", fac:FacSet.MON, kind:1, diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index 5c07f526..3deacdbf 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -91,6 +91,12 @@ export class BuffComp extends Component { // this.node.getChildByName("top").getChildByName("hp").active = (hp == hp_max) ? false : true; } + mp_show(mp:number,mp_max:number){ + this.node.getChildByName("top").getChildByName("pow").getComponent(ProgressBar).progress = mp/mp_max; + this.scheduleOnce(()=>{ + this.node.getChildByName("top").getChildByName("pow").getChildByName("mpb").getComponent(ProgressBar).progress = mp/mp_max; + },0.15) + } update_info_lv(){ diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index a7eb0828..04f05be3 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -120,7 +120,7 @@ export class HeroViewComp extends CCComp { } /* 显示角色血*/ this.node.getChildByName("top").getChildByName("hp").active = true; - this.BUFFCOMP.show_shield(this.shield,this.Attrs[Attrs.SHIELD_MAX]) + this.node.getChildByName("top").getChildByName("pow").active = true; } // ==================== BUFF系统初始==================== @@ -494,12 +494,16 @@ export class HeroViewComp extends CCComp { this.processDamageQueue(); // 更新临时 buff/debuff 时间 this.updateTemporaryBuffsDebuffs(dt); + this.BUFFCOMP.hp_show(this.hp,this.Attrs[Attrs.HP_MAX]) + this.BUFFCOMP.mp_show(this.mp,this.Attrs[Attrs.MP_MAX]) + this.BUFFCOMP.show_shield(this.shield,this.Attrs[Attrs.SHIELD_MAX]) } BaseUp(dt:number){ this.mp += HeroUpSet.MP*dt this.hp += HeroUpSet.HP*dt if(this.mp > this.Attrs[Attrs.MP_MAX]) this.mp = this.Attrs[Attrs.MP_MAX] if(this.hp > this.Attrs[Attrs.HP_MAX]) this.hp = this.Attrs[Attrs.HP_MAX] + } do_fight_end(){ this.as.do_buff() @@ -587,23 +591,15 @@ export class HeroViewComp extends CCComp { } - do_atked(remainingDamage:number, - crit:number=0,crit_d:number=0, - burn_count:number=0,burn_value:number=0, - stun_time:number=0,stun_ratio:number=0, - frost_time:number=0,frost_ratio:number=0, - atked_anm:string="atked" - ){ + do_atked(remainingDamage:number,CAttrs:any,s_uuid:number){ + let SConf=SkillSet[s_uuid] this.do_atked_trigger() - - if(this.check_dodge()) return - let is_crit = this.check_crit(crit) - + let is_crit = this.check_crit(CAttrs[Attrs.CRITICAL]) if(this == null) return; let damage = this.count_damage(remainingDamage) if(is_crit) { - damage = Math.floor(damage * (1 + (FightSet.CRIT_DAMAGE+crit_d)/100)) + damage = Math.floor(damage * (1 + (FightSet.CRIT_DAMAGE+CAttrs[Attrs.CRITICAL_DMG])/100)) } // console.log(this.hero_name+"[HeroViewComp]:heroview :damage|hp|hp_max",damage,this.hp,this.Attrs[BuffAttr.HP_MAX]) damage=this.check_shield(damage) @@ -625,12 +621,9 @@ export class HeroViewComp extends CCComp { } } - - // this.update_vm this.back() - this.showDamage(damage, is_crit,atked_anm); - + this.showDamage(damage, is_crit,SConf.AtkedType); } //后退 back(){ diff --git a/assets/script/game/skill/AtkConCom.ts b/assets/script/game/skill/AtkConCom.ts index 43e59dd1..d519a0bc 100644 --- a/assets/script/game/skill/AtkConCom.ts +++ b/assets/script/game/skill/AtkConCom.ts @@ -1,8 +1,8 @@ -import { _decorator, Animation, CCBoolean, Collider2D, Contact2DType, Tween, v3, Vec3 } from "cc"; +import { _decorator, Animation, CCBoolean, Collider2D, Contact2DType, Tween, UITransform, v3, Vec3 } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { BezierMove } from "../BezierMove/BezierMove"; -import { DTType, EType, SkillSet, SType } from "../common/config/SkillSet"; +import { Attrs, DTType, EType, SkillSet, SType } from "../common/config/SkillSet"; import { BoxSet, FacSet } from "../common/config/BoxSet"; import { HeroViewComp } from "../hero/HeroViewComp"; import { GameEvent } from "../common/config/GameEvent"; @@ -28,6 +28,7 @@ export class AtkConCom extends CCComp { run_time:number = 0; // 战斗相关运行时数据 Attrs:any=null + hit_count:number = 0; // 组件引用 anim:Animation=null; tweenInstance:Tween = null; @@ -133,29 +134,16 @@ export class AtkConCom extends CCComp { // if(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害 if(target == null) return; if (!this.Config) return; - // let ap=this.ap - // if(this.hit_count > 0 &&!is_range ){ - // ap=ap*(50+this.puncture_damage)/100 - // } - // target.do_atked(ap,this.caster_crit,this.caster_crit_d, - // this.burn_count,this.burn_value, - // this.stun_time,this.stun_ratio, - // this.frost_time,this.frost_ratio, - // this.Config.AtkedType - // ) // ap 及暴击 属性已经在skill.ts 处理 - // // console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position) - // if(this.Config.debuff>0){ - // let debuff=this.Config - // let dev=debuff.deV*(100+this.debuff_value)/100 - // let deR=debuff.deR+this.debuff_up - // dev=Math.round(dev*100)/100 - // let deC=debuff.deC+this.debuff_count //dec只作为次数叠加 - // // //console.log("[SkillCom]:debuff",this.Config.name,debuff.debuff,deUP.deV,deUP.deC) - // target.add_debuff(debuff.debuff,dev,deC,deR) - // } - // this.hit_count++ - // // console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,this.Config.hit,this.puncture) - // if(this.hit_count>=(this.Config.hit+this.puncture)&&(this.Config.DTType!=DTType.range)&&(this.Config.EType!=EType.animationEnd)&&(this.Config.EType!=EType.timeEnd)) this.is_destroy=true // 技能命中次数 + let damage=Math.floor(this.Attrs[Attrs.AP]*(SkillSet[this.s_uuid].ap/100)) + if(this.hit_count > 0 &&!is_range ){ + let Percentage=Math.pow((50+this.Attrs[Attrs.PUNCTURE_DMG])/100, this.hit_count) + damage=damage*Percentage + } + target.do_atked(damage,this.Attrs,this.s_uuid) // ap 及暴击 属性已经在skill.ts 处理 + // console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position) + this.hit_count++ + // console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,this.Config.hit,this.puncture) + if(this.hit_count>=(this.Config.hit+this.Attrs[Attrs.PUNCTURE])&&(this.Config.DTType!=DTType.range)&&(this.Config.EType!=EType.animationEnd)&&(this.Config.EType!=EType.timeEnd)) this.is_destroy=true // 技能命中次数 } update(deltaTime: number) { // 确保配置已初始化(处理 update 可能先于 start 执行的情况) @@ -181,7 +169,50 @@ export class AtkConCom extends CCComp { this.toDestroy(); } - + public atk(args:any){ + let dis=this.node.getComponent(UITransform).width/2 + let targetsInRange: HeroViewComp[] = [] + + // 收集范围内所有敌方目标 + ecs.query(ecs.allOf(HeroViewComp)).some(e => { + const view = e.get(HeroViewComp); + if(view.fac!=this.fac) { + const distance = Math.abs(this.node.position.x - view.node.position.x); + if(distance <= dis) { + targetsInRange.push(view); + } + } + }); + + // 根据配置的hit_num决定攻击模式 + const hitNum = SkillSet[this.s_uuid].hit_num || 0; + if(hitNum > 0) { + // 限制目标数量:按距离排序,选择最近的N个目标 + if(targetsInRange.length > 0) { + // 按距离排序(从近到远) + targetsInRange.sort((a, b) => { + const distanceA = Math.abs(this.node.position.x - a.node.position.x); + const distanceB = Math.abs(this.node.position.x - b.node.position.x); + return distanceA - distanceB; + }); + + // 限制目标数量 + const maxTargets = Math.min(hitNum, targetsInRange.length); + const selectedTargets = targetsInRange.slice(0, maxTargets); + + selectedTargets.forEach(target => { + this.single_damage(target, false); + }); + } + } else { + // 范围伤害:对所有范围内目标造成伤害 + if(targetsInRange.length > 0) { + targetsInRange.forEach(target => { + this.single_damage(target, false); + }); + } + } + } toDestroy() { if(this.is_destroy){ if (this.ent) { diff --git a/assets/script/game/skill/SkillViewCom.ts b/assets/script/game/skill/SkillViewCom.ts index 56a6bdc1..2812421c 100644 --- a/assets/script/game/skill/SkillViewCom.ts +++ b/assets/script/game/skill/SkillViewCom.ts @@ -1,4 +1,4 @@ -import { _decorator, CCBoolean, CCInteger, instantiate, Node, Prefab, v3, Vec3 } from "cc"; +import { _decorator, CCBoolean, CCFloat, CCInteger, instantiate, Node, Prefab, v3, Vec3 } from "cc"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { HeroViewComp } from "../hero/HeroViewComp"; @@ -17,23 +17,29 @@ export class SkillViewCom extends CCComp { atkPrefab: Prefab = null! @property hasReady: boolean = false; + @property + ReadyLoop: boolean = false // 预备是否循环 + @property({ type: CCFloat }) + SkillTime: number = 0 // 技能控制存续时间时间 + @property({ type: CCFloat }) + ReadyTime: number = 0 // 技能前摇时间 @property({ type: CCInteger }) - ReadyTime: number = 0 - @property({ type: CCInteger }) - runType: number = 0 + runType: number = 0 //技能运行类型 0-线性 1-贝塞尔 2-开始位置固定 3-目标位置固定 @property({ type: CCInteger }) ready_y: number = 0 @property({ type: CCInteger }) atk_x: number = 0 @property({ type: CCInteger }) atk_y: number = 0 + @property({ type: CCInteger }) + s_count:number=1; + @property({ type: CCFloat }) + s_interval:number=0.2; endTime: number = 0; readyFinish: boolean = false; caster:HeroViewComp=null!; s_uuid:number=0; - s_count:number=1; - s_interval:number=0.2; s_cd:number=0; scale: number = 0; cName:string=""; @@ -60,7 +66,7 @@ export class SkillViewCom extends CCComp { } doEnd(dt: number) { this.endTime += dt - if(this.endTime >= SkillSet[this.s_uuid].in) { + if(this.endTime >= this.SkillTime) { this.ent.destroy() } } diff --git a/assets/script/game/skills/com/AtkCom.ts b/assets/script/game/skills/com/AtkCom.ts index 44ff8376..a04b9394 100644 --- a/assets/script/game/skills/com/AtkCom.ts +++ b/assets/script/game/skills/com/AtkCom.ts @@ -4,6 +4,7 @@ import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/m import { HeroViewComp } from "../../hero/HeroViewComp"; import { SkillCom } from "../SkillCom"; import { AtkConCom } from "../../skill/AtkConCom"; +import { SkillSet } from "../../common/config/SkillSet"; const { ccclass, property } = _decorator; @@ -17,53 +18,7 @@ export class AtkComComp extends CCComp { // this.on(ModuleEvent.Cmd, this.onHandler, this); } - public atk(args:any){ - let scom=this.node.getComponent(SkillCom) - let acom=this.node.getComponent(AtkConCom) - let skill=scom?scom:acom - let dis=this.node.getComponent(UITransform).width/2 - let targetsInRange: HeroViewComp[] = [] - - // 收集范围内所有敌方目标 - ecs.query(ecs.allOf(HeroViewComp)).some(e => { - const view = e.get(HeroViewComp); - if(view.fac!=skill.fac) { - const distance = Math.abs(skill.node.position.x - view.node.position.x); - if(distance <= dis) { - targetsInRange.push(view); - } - } - }); - - // 根据配置的hit_num决定攻击模式 - const hitNum = skill.skillConfig?.hit_num || 0; - if(hitNum > 0) { - // 限制目标数量:按距离排序,选择最近的N个目标 - if(targetsInRange.length > 0) { - // 按距离排序(从近到远) - targetsInRange.sort((a, b) => { - const distanceA = Math.abs(skill.node.position.x - a.node.position.x); - const distanceB = Math.abs(skill.node.position.x - b.node.position.x); - return distanceA - distanceB; - }); - - // 限制目标数量 - const maxTargets = Math.min(hitNum, targetsInRange.length); - const selectedTargets = targetsInRange.slice(0, maxTargets); - - selectedTargets.forEach(target => { - skill.single_damage(target, false); - }); - } - } else { - // 范围伤害:对所有范围内目标造成伤害 - if(targetsInRange.length > 0) { - targetsInRange.forEach(target => { - skill.single_damage(target, false); - }); - } - } - } + /** 全局消息逻辑处理 */ // private onHandler(event: string, args: any) { // switch (event) {