@ -0,0 +1,239 @@ |
||||
[ |
||||
{ |
||||
"__type__": "cc.Prefab", |
||||
"_name": "冲锋", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"_native": "", |
||||
"data": { |
||||
"__id__": 1 |
||||
}, |
||||
"optimizationPolicy": 0, |
||||
"persistent": false |
||||
}, |
||||
{ |
||||
"__type__": "cc.Node", |
||||
"_name": "冲锋", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"_parent": null, |
||||
"_children": [ |
||||
{ |
||||
"__id__": 2 |
||||
} |
||||
], |
||||
"_active": true, |
||||
"_components": [ |
||||
{ |
||||
"__id__": 8 |
||||
} |
||||
], |
||||
"_prefab": { |
||||
"__id__": 10 |
||||
}, |
||||
"_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": 33554432, |
||||
"_euler": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 0, |
||||
"y": 0, |
||||
"z": 0 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.Node", |
||||
"_name": "anim", |
||||
"_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": 1, |
||||
"w": 6.123233995736766e-17 |
||||
}, |
||||
"_lscale": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 1, |
||||
"y": 1, |
||||
"z": 1 |
||||
}, |
||||
"_mobility": 0, |
||||
"_layer": 33554432, |
||||
"_euler": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 0, |
||||
"y": 0, |
||||
"z": 180 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.UITransform", |
||||
"_name": "", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"node": { |
||||
"__id__": 2 |
||||
}, |
||||
"_enabled": true, |
||||
"__prefab": { |
||||
"__id__": 4 |
||||
}, |
||||
"_contentSize": { |
||||
"__type__": "cc.Size", |
||||
"width": 73.52999877929688, |
||||
"height": 96.18000030517578 |
||||
}, |
||||
"_anchorPoint": { |
||||
"__type__": "cc.Vec2", |
||||
"x": 0.5167958742126253, |
||||
"y": 0.46049075457472155 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.CompPrefabInfo", |
||||
"fileId": "6dPq83nl1O5o9qTkimZ7R9" |
||||
}, |
||||
{ |
||||
"__type__": "sp.Skeleton", |
||||
"_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 |
||||
}, |
||||
"_skeletonData": { |
||||
"__uuid__": "542e1bba-b475-48e1-93b2-89480d605a79", |
||||
"__expectedType__": "sp.SkeletonData" |
||||
}, |
||||
"defaultSkin": "default", |
||||
"defaultAnimation": "飞枪冲锋", |
||||
"_premultipliedAlpha": false, |
||||
"_timeScale": 1, |
||||
"_preCacheMode": 0, |
||||
"_cacheMode": 0, |
||||
"_sockets": [], |
||||
"_useTint": false, |
||||
"_debugMesh": false, |
||||
"_debugBones": false, |
||||
"_debugSlots": false, |
||||
"_enableBatch": false, |
||||
"loop": true, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.CompPrefabInfo", |
||||
"fileId": "63N5sjMbZDx7R+K9dcNiTs" |
||||
}, |
||||
{ |
||||
"__type__": "cc.PrefabInfo", |
||||
"root": { |
||||
"__id__": 1 |
||||
}, |
||||
"asset": { |
||||
"__id__": 0 |
||||
}, |
||||
"fileId": "8fJAVQhwBGSKcm4lWgcbKD", |
||||
"instance": null, |
||||
"targetOverrides": null, |
||||
"nestedPrefabInstanceRoots": null |
||||
}, |
||||
{ |
||||
"__type__": "cc.UITransform", |
||||
"_name": "", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"node": { |
||||
"__id__": 1 |
||||
}, |
||||
"_enabled": true, |
||||
"__prefab": { |
||||
"__id__": 9 |
||||
}, |
||||
"_contentSize": { |
||||
"__type__": "cc.Size", |
||||
"width": 200, |
||||
"height": 200 |
||||
}, |
||||
"_anchorPoint": { |
||||
"__type__": "cc.Vec2", |
||||
"x": 0.5, |
||||
"y": 0.5 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.CompPrefabInfo", |
||||
"fileId": "451RzMpQpFLalWlPKOafD2" |
||||
}, |
||||
{ |
||||
"__type__": "cc.PrefabInfo", |
||||
"root": { |
||||
"__id__": 1 |
||||
}, |
||||
"asset": { |
||||
"__id__": 0 |
||||
}, |
||||
"fileId": "38JEit66ZI+Y7iGQ+17T7W", |
||||
"instance": null, |
||||
"targetOverrides": null |
||||
} |
||||
] |
||||
@ -0,0 +1,13 @@ |
||||
{ |
||||
"ver": "1.1.50", |
||||
"importer": "prefab", |
||||
"imported": true, |
||||
"uuid": "ddf958ce-0ad3-40fe-ab46-8a98be709de4", |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {}, |
||||
"userData": { |
||||
"syncNodeName": "冲锋" |
||||
} |
||||
} |
||||
@ -0,0 +1,239 @@ |
||||
[ |
||||
{ |
||||
"__type__": "cc.Prefab", |
||||
"_name": "土刺", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"_native": "", |
||||
"data": { |
||||
"__id__": 1 |
||||
}, |
||||
"optimizationPolicy": 0, |
||||
"persistent": false |
||||
}, |
||||
{ |
||||
"__type__": "cc.Node", |
||||
"_name": "土刺", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"_parent": null, |
||||
"_children": [ |
||||
{ |
||||
"__id__": 2 |
||||
} |
||||
], |
||||
"_active": true, |
||||
"_components": [ |
||||
{ |
||||
"__id__": 8 |
||||
} |
||||
], |
||||
"_prefab": { |
||||
"__id__": 10 |
||||
}, |
||||
"_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": 33554432, |
||||
"_euler": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 0, |
||||
"y": 0, |
||||
"z": 0 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.Node", |
||||
"_name": "icon", |
||||
"_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": 1, |
||||
"w": 6.123233995736766e-17 |
||||
}, |
||||
"_lscale": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 1, |
||||
"y": 1, |
||||
"z": 1 |
||||
}, |
||||
"_mobility": 0, |
||||
"_layer": 33554432, |
||||
"_euler": { |
||||
"__type__": "cc.Vec3", |
||||
"x": 0, |
||||
"y": 0, |
||||
"z": 180 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.UITransform", |
||||
"_name": "", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"node": { |
||||
"__id__": 2 |
||||
}, |
||||
"_enabled": true, |
||||
"__prefab": { |
||||
"__id__": 4 |
||||
}, |
||||
"_contentSize": { |
||||
"__type__": "cc.Size", |
||||
"width": 139, |
||||
"height": 50 |
||||
}, |
||||
"_anchorPoint": { |
||||
"__type__": "cc.Vec2", |
||||
"x": 0.5, |
||||
"y": 0.5 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.CompPrefabInfo", |
||||
"fileId": "fdzTh+tYZEhI11kKqjFBe7" |
||||
}, |
||||
{ |
||||
"__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__": "84452a93-0349-435e-b732-8f7814e38a98@f9941", |
||||
"__expectedType__": "cc.SpriteFrame" |
||||
}, |
||||
"_type": 0, |
||||
"_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": "cfciGdRx1ORZesbsRtCqtj" |
||||
}, |
||||
{ |
||||
"__type__": "cc.PrefabInfo", |
||||
"root": { |
||||
"__id__": 1 |
||||
}, |
||||
"asset": { |
||||
"__id__": 0 |
||||
}, |
||||
"fileId": "41giWeE6BPxKcxypzVJSnI", |
||||
"instance": null, |
||||
"targetOverrides": null, |
||||
"nestedPrefabInstanceRoots": null |
||||
}, |
||||
{ |
||||
"__type__": "cc.UITransform", |
||||
"_name": "", |
||||
"_objFlags": 0, |
||||
"__editorExtras__": {}, |
||||
"node": { |
||||
"__id__": 1 |
||||
}, |
||||
"_enabled": true, |
||||
"__prefab": { |
||||
"__id__": 9 |
||||
}, |
||||
"_contentSize": { |
||||
"__type__": "cc.Size", |
||||
"width": 200, |
||||
"height": 200 |
||||
}, |
||||
"_anchorPoint": { |
||||
"__type__": "cc.Vec2", |
||||
"x": 0.5, |
||||
"y": 0.5 |
||||
}, |
||||
"_id": "" |
||||
}, |
||||
{ |
||||
"__type__": "cc.CompPrefabInfo", |
||||
"fileId": "451RzMpQpFLalWlPKOafD2" |
||||
}, |
||||
{ |
||||
"__type__": "cc.PrefabInfo", |
||||
"root": { |
||||
"__id__": 1 |
||||
}, |
||||
"asset": { |
||||
"__id__": 0 |
||||
}, |
||||
"fileId": "38JEit66ZI+Y7iGQ+17T7W", |
||||
"instance": null, |
||||
"targetOverrides": null |
||||
} |
||||
] |
||||
@ -0,0 +1,13 @@ |
||||
{ |
||||
"ver": "1.1.50", |
||||
"importer": "prefab", |
||||
"imported": true, |
||||
"uuid": "33370061-8ff0-40ec-be91-e8560f564066", |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {}, |
||||
"userData": { |
||||
"syncNodeName": "土刺" |
||||
} |
||||
} |
||||
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 49 KiB |
@ -1,134 +0,0 @@ |
||||
{ |
||||
"ver": "1.0.27", |
||||
"importer": "image", |
||||
"imported": true, |
||||
"uuid": "e9d895bc-ccdf-481f-b5cc-c67c551469b5", |
||||
"files": [ |
||||
".json", |
||||
".png" |
||||
], |
||||
"subMetas": { |
||||
"6c48a": { |
||||
"importer": "texture", |
||||
"uuid": "e9d895bc-ccdf-481f-b5cc-c67c551469b5@6c48a", |
||||
"displayName": "地刺2", |
||||
"id": "6c48a", |
||||
"name": "texture", |
||||
"userData": { |
||||
"wrapModeS": "clamp-to-edge", |
||||
"wrapModeT": "clamp-to-edge", |
||||
"imageUuidOrDatabaseUri": "e9d895bc-ccdf-481f-b5cc-c67c551469b5", |
||||
"isUuid": true, |
||||
"visible": false, |
||||
"minfilter": "linear", |
||||
"magfilter": "linear", |
||||
"mipfilter": "none", |
||||
"anisotropy": 0 |
||||
}, |
||||
"ver": "1.0.22", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
}, |
||||
"f9941": { |
||||
"importer": "sprite-frame", |
||||
"uuid": "e9d895bc-ccdf-481f-b5cc-c67c551469b5@f9941", |
||||
"displayName": "地刺2", |
||||
"id": "f9941", |
||||
"name": "spriteFrame", |
||||
"userData": { |
||||
"trimThreshold": 1, |
||||
"rotated": false, |
||||
"offsetX": 0, |
||||
"offsetY": 0, |
||||
"trimX": 24, |
||||
"trimY": 30, |
||||
"width": 152, |
||||
"height": 140, |
||||
"rawWidth": 200, |
||||
"rawHeight": 200, |
||||
"borderTop": 0, |
||||
"borderBottom": 0, |
||||
"borderLeft": 0, |
||||
"borderRight": 0, |
||||
"packable": true, |
||||
"pixelsToUnit": 100, |
||||
"pivotX": 0.5, |
||||
"pivotY": 0.5, |
||||
"meshType": 0, |
||||
"vertices": { |
||||
"rawPosition": [ |
||||
-76, |
||||
-70, |
||||
0, |
||||
76, |
||||
-70, |
||||
0, |
||||
-76, |
||||
70, |
||||
0, |
||||
76, |
||||
70, |
||||
0 |
||||
], |
||||
"indexes": [ |
||||
0, |
||||
1, |
||||
2, |
||||
2, |
||||
1, |
||||
3 |
||||
], |
||||
"uv": [ |
||||
24, |
||||
170, |
||||
176, |
||||
170, |
||||
24, |
||||
30, |
||||
176, |
||||
30 |
||||
], |
||||
"nuv": [ |
||||
0.12, |
||||
0.15, |
||||
0.88, |
||||
0.15, |
||||
0.12, |
||||
0.85, |
||||
0.88, |
||||
0.85 |
||||
], |
||||
"minPos": [ |
||||
-76, |
||||
-70, |
||||
0 |
||||
], |
||||
"maxPos": [ |
||||
76, |
||||
70, |
||||
0 |
||||
] |
||||
}, |
||||
"isUuid": true, |
||||
"imageUuidOrDatabaseUri": "e9d895bc-ccdf-481f-b5cc-c67c551469b5@6c48a", |
||||
"atlasUuid": "", |
||||
"trimType": "auto" |
||||
}, |
||||
"ver": "1.0.12", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
} |
||||
}, |
||||
"userData": { |
||||
"type": "sprite-frame", |
||||
"fixAlphaTransparencyArtifacts": false, |
||||
"hasAlpha": true, |
||||
"redirect": "e9d895bc-ccdf-481f-b5cc-c67c551469b5@6c48a" |
||||
} |
||||
} |
||||
|
Before Width: | Height: | Size: 46 KiB |
@ -1,134 +0,0 @@ |
||||
{ |
||||
"ver": "1.0.27", |
||||
"importer": "image", |
||||
"imported": true, |
||||
"uuid": "5d412788-43dc-4908-9ae0-8dcba40f865c", |
||||
"files": [ |
||||
".json", |
||||
".png" |
||||
], |
||||
"subMetas": { |
||||
"6c48a": { |
||||
"importer": "texture", |
||||
"uuid": "5d412788-43dc-4908-9ae0-8dcba40f865c@6c48a", |
||||
"displayName": "地刺3", |
||||
"id": "6c48a", |
||||
"name": "texture", |
||||
"userData": { |
||||
"wrapModeS": "clamp-to-edge", |
||||
"wrapModeT": "clamp-to-edge", |
||||
"imageUuidOrDatabaseUri": "5d412788-43dc-4908-9ae0-8dcba40f865c", |
||||
"isUuid": true, |
||||
"visible": false, |
||||
"minfilter": "linear", |
||||
"magfilter": "linear", |
||||
"mipfilter": "none", |
||||
"anisotropy": 0 |
||||
}, |
||||
"ver": "1.0.22", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
}, |
||||
"f9941": { |
||||
"importer": "sprite-frame", |
||||
"uuid": "5d412788-43dc-4908-9ae0-8dcba40f865c@f9941", |
||||
"displayName": "地刺3", |
||||
"id": "f9941", |
||||
"name": "spriteFrame", |
||||
"userData": { |
||||
"trimThreshold": 1, |
||||
"rotated": false, |
||||
"offsetX": 0, |
||||
"offsetY": 0.5, |
||||
"trimX": 26, |
||||
"trimY": 20, |
||||
"width": 148, |
||||
"height": 159, |
||||
"rawWidth": 200, |
||||
"rawHeight": 200, |
||||
"borderTop": 0, |
||||
"borderBottom": 0, |
||||
"borderLeft": 0, |
||||
"borderRight": 0, |
||||
"packable": true, |
||||
"pixelsToUnit": 100, |
||||
"pivotX": 0.5, |
||||
"pivotY": 0.5, |
||||
"meshType": 0, |
||||
"vertices": { |
||||
"rawPosition": [ |
||||
-74, |
||||
-79.5, |
||||
0, |
||||
74, |
||||
-79.5, |
||||
0, |
||||
-74, |
||||
79.5, |
||||
0, |
||||
74, |
||||
79.5, |
||||
0 |
||||
], |
||||
"indexes": [ |
||||
0, |
||||
1, |
||||
2, |
||||
2, |
||||
1, |
||||
3 |
||||
], |
||||
"uv": [ |
||||
26, |
||||
180, |
||||
174, |
||||
180, |
||||
26, |
||||
21, |
||||
174, |
||||
21 |
||||
], |
||||
"nuv": [ |
||||
0.13, |
||||
0.105, |
||||
0.87, |
||||
0.105, |
||||
0.13, |
||||
0.9, |
||||
0.87, |
||||
0.9 |
||||
], |
||||
"minPos": [ |
||||
-74, |
||||
-79.5, |
||||
0 |
||||
], |
||||
"maxPos": [ |
||||
74, |
||||
79.5, |
||||
0 |
||||
] |
||||
}, |
||||
"isUuid": true, |
||||
"imageUuidOrDatabaseUri": "5d412788-43dc-4908-9ae0-8dcba40f865c@6c48a", |
||||
"atlasUuid": "", |
||||
"trimType": "auto" |
||||
}, |
||||
"ver": "1.0.12", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
} |
||||
}, |
||||
"userData": { |
||||
"type": "sprite-frame", |
||||
"fixAlphaTransparencyArtifacts": false, |
||||
"hasAlpha": true, |
||||
"redirect": "5d412788-43dc-4908-9ae0-8dcba40f865c@6c48a" |
||||
} |
||||
} |
||||
|
Before Width: | Height: | Size: 57 KiB |
@ -1,134 +0,0 @@ |
||||
{ |
||||
"ver": "1.0.27", |
||||
"importer": "image", |
||||
"imported": true, |
||||
"uuid": "eb06c713-ba2b-43b6-b730-9cf887f91acf", |
||||
"files": [ |
||||
".json", |
||||
".png" |
||||
], |
||||
"subMetas": { |
||||
"6c48a": { |
||||
"importer": "texture", |
||||
"uuid": "eb06c713-ba2b-43b6-b730-9cf887f91acf@6c48a", |
||||
"displayName": "地刺4", |
||||
"id": "6c48a", |
||||
"name": "texture", |
||||
"userData": { |
||||
"wrapModeS": "clamp-to-edge", |
||||
"wrapModeT": "clamp-to-edge", |
||||
"imageUuidOrDatabaseUri": "eb06c713-ba2b-43b6-b730-9cf887f91acf", |
||||
"isUuid": true, |
||||
"visible": false, |
||||
"minfilter": "linear", |
||||
"magfilter": "linear", |
||||
"mipfilter": "none", |
||||
"anisotropy": 0 |
||||
}, |
||||
"ver": "1.0.22", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
}, |
||||
"f9941": { |
||||
"importer": "sprite-frame", |
||||
"uuid": "eb06c713-ba2b-43b6-b730-9cf887f91acf@f9941", |
||||
"displayName": "地刺4", |
||||
"id": "f9941", |
||||
"name": "spriteFrame", |
||||
"userData": { |
||||
"trimThreshold": 1, |
||||
"rotated": false, |
||||
"offsetX": -0.5, |
||||
"offsetY": 0, |
||||
"trimX": 16, |
||||
"trimY": 25, |
||||
"width": 167, |
||||
"height": 150, |
||||
"rawWidth": 200, |
||||
"rawHeight": 200, |
||||
"borderTop": 0, |
||||
"borderBottom": 0, |
||||
"borderLeft": 0, |
||||
"borderRight": 0, |
||||
"packable": true, |
||||
"pixelsToUnit": 100, |
||||
"pivotX": 0.5, |
||||
"pivotY": 0.5, |
||||
"meshType": 0, |
||||
"vertices": { |
||||
"rawPosition": [ |
||||
-83.5, |
||||
-75, |
||||
0, |
||||
83.5, |
||||
-75, |
||||
0, |
||||
-83.5, |
||||
75, |
||||
0, |
||||
83.5, |
||||
75, |
||||
0 |
||||
], |
||||
"indexes": [ |
||||
0, |
||||
1, |
||||
2, |
||||
2, |
||||
1, |
||||
3 |
||||
], |
||||
"uv": [ |
||||
16, |
||||
175, |
||||
183, |
||||
175, |
||||
16, |
||||
25, |
||||
183, |
||||
25 |
||||
], |
||||
"nuv": [ |
||||
0.08, |
||||
0.125, |
||||
0.915, |
||||
0.125, |
||||
0.08, |
||||
0.875, |
||||
0.915, |
||||
0.875 |
||||
], |
||||
"minPos": [ |
||||
-83.5, |
||||
-75, |
||||
0 |
||||
], |
||||
"maxPos": [ |
||||
83.5, |
||||
75, |
||||
0 |
||||
] |
||||
}, |
||||
"isUuid": true, |
||||
"imageUuidOrDatabaseUri": "eb06c713-ba2b-43b6-b730-9cf887f91acf@6c48a", |
||||
"atlasUuid": "", |
||||
"trimType": "auto" |
||||
}, |
||||
"ver": "1.0.12", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
} |
||||
}, |
||||
"userData": { |
||||
"type": "sprite-frame", |
||||
"fixAlphaTransparencyArtifacts": false, |
||||
"hasAlpha": true, |
||||
"redirect": "eb06c713-ba2b-43b6-b730-9cf887f91acf@6c48a" |
||||
} |
||||
} |
||||
|
Before Width: | Height: | Size: 53 KiB |
@ -1,134 +0,0 @@ |
||||
{ |
||||
"ver": "1.0.27", |
||||
"importer": "image", |
||||
"imported": true, |
||||
"uuid": "57095dc9-bab4-4732-8a52-98135b49c8a0", |
||||
"files": [ |
||||
".json", |
||||
".png" |
||||
], |
||||
"subMetas": { |
||||
"6c48a": { |
||||
"importer": "texture", |
||||
"uuid": "57095dc9-bab4-4732-8a52-98135b49c8a0@6c48a", |
||||
"displayName": "地刺5", |
||||
"id": "6c48a", |
||||
"name": "texture", |
||||
"userData": { |
||||
"wrapModeS": "clamp-to-edge", |
||||
"wrapModeT": "clamp-to-edge", |
||||
"imageUuidOrDatabaseUri": "57095dc9-bab4-4732-8a52-98135b49c8a0", |
||||
"isUuid": true, |
||||
"visible": false, |
||||
"minfilter": "linear", |
||||
"magfilter": "linear", |
||||
"mipfilter": "none", |
||||
"anisotropy": 0 |
||||
}, |
||||
"ver": "1.0.22", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
}, |
||||
"f9941": { |
||||
"importer": "sprite-frame", |
||||
"uuid": "57095dc9-bab4-4732-8a52-98135b49c8a0@f9941", |
||||
"displayName": "地刺5", |
||||
"id": "f9941", |
||||
"name": "spriteFrame", |
||||
"userData": { |
||||
"trimThreshold": 1, |
||||
"rotated": false, |
||||
"offsetX": -0.5, |
||||
"offsetY": 0.5, |
||||
"trimX": 17, |
||||
"trimY": 20, |
||||
"width": 165, |
||||
"height": 159, |
||||
"rawWidth": 200, |
||||
"rawHeight": 200, |
||||
"borderTop": 0, |
||||
"borderBottom": 0, |
||||
"borderLeft": 0, |
||||
"borderRight": 0, |
||||
"packable": true, |
||||
"pixelsToUnit": 100, |
||||
"pivotX": 0.5, |
||||
"pivotY": 0.5, |
||||
"meshType": 0, |
||||
"vertices": { |
||||
"rawPosition": [ |
||||
-82.5, |
||||
-79.5, |
||||
0, |
||||
82.5, |
||||
-79.5, |
||||
0, |
||||
-82.5, |
||||
79.5, |
||||
0, |
||||
82.5, |
||||
79.5, |
||||
0 |
||||
], |
||||
"indexes": [ |
||||
0, |
||||
1, |
||||
2, |
||||
2, |
||||
1, |
||||
3 |
||||
], |
||||
"uv": [ |
||||
17, |
||||
180, |
||||
182, |
||||
180, |
||||
17, |
||||
21, |
||||
182, |
||||
21 |
||||
], |
||||
"nuv": [ |
||||
0.085, |
||||
0.105, |
||||
0.91, |
||||
0.105, |
||||
0.085, |
||||
0.9, |
||||
0.91, |
||||
0.9 |
||||
], |
||||
"minPos": [ |
||||
-82.5, |
||||
-79.5, |
||||
0 |
||||
], |
||||
"maxPos": [ |
||||
82.5, |
||||
79.5, |
||||
0 |
||||
] |
||||
}, |
||||
"isUuid": true, |
||||
"imageUuidOrDatabaseUri": "57095dc9-bab4-4732-8a52-98135b49c8a0@6c48a", |
||||
"atlasUuid": "", |
||||
"trimType": "auto" |
||||
}, |
||||
"ver": "1.0.12", |
||||
"imported": true, |
||||
"files": [ |
||||
".json" |
||||
], |
||||
"subMetas": {} |
||||
} |
||||
}, |
||||
"userData": { |
||||
"type": "sprite-frame", |
||||
"fixAlphaTransparencyArtifacts": false, |
||||
"hasAlpha": true, |
||||
"redirect": "57095dc9-bab4-4732-8a52-98135b49c8a0@6c48a" |
||||
} |
||||
} |
||||
@ -1 +1 @@ |
||||
{"skeleton":{"hash":"yW1x4hib05QPd5jdplJVnWreS0o","spine":"3.8.75","x":-86.82,"y":-61.02,"width":173.43,"height":148.72},"bones":[{"name":"root"},{"name":"images/剑气1","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":9.3,"scaleX":-0.3245,"scaleY":0.3245},{"name":"images/剑气2","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":9.3,"scaleX":-0.3245,"scaleY":0.3245},{"name":"images/剑气3","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":16,"scaleX":-0.3245,"scaleY":-0.3245}],"slots":[{"name":"images/剑气1","bone":"images/剑气1","attachment":"images/剑气2"},{"name":"images/剑气2","bone":"images/剑气2","attachment":"images/剑气2"},{"name":"images/剑气3","bone":"images/剑气3","attachment":"images/剑气2"}],"skins":[{"name":"default","attachments":{"images/剑气1":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416}},"images/剑气2":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416}},"images/剑气3":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416}}}}],"animations":{"剑气红":{"slots":{"images/剑气2":{"color":[{"color":"ffffff00"},{"time":0.2,"color":"ffffffff"},{"time":0.3667,"color":"ffffff00"}],"attachment":[{"name":"images/剑气3"},{"time":0.4,"name":"images/剑气2"}]},"images/剑气3":{"color":[{"color":"ffffffd4"},{"time":0.0333,"color":"ffffffff"},{"time":0.2,"color":"ffffff00","curve":"stepped"},{"time":0.2333,"color":"ffffff00"},{"time":0.4,"color":"ffffffd4"}],"attachment":[{"name":"images/剑气3"}]},"images/剑气1":{"attachment":[{"name":"images/剑气3"}]}},"bones":{"images/剑气1":{"scale":[{},{"time":0.0667,"x":1.084},{"time":0.2},{"time":0.2667,"x":1.084},{"time":0.4}]},"images/剑气2":{"translate":[{},{"time":0.3667,"x":12.51},{"time":0.4}],"scale":[{},{"time":0.3667,"x":1.251},{"time":0.4}]},"images/剑气3":{"translate":[{"x":5.68},{"time":0.2,"x":12.51},{"time":0.2333},{"time":0.4,"x":5.68}],"scale":[{"x":1.114},{"time":0.2,"x":1.251},{"time":0.2333},{"time":0.4,"x":1.114}]}}},"剑气蓝":{"slots":{"images/剑气2":{"color":[{"color":"ffffff00"},{"time":0.2,"color":"ffffffff"},{"time":0.3667,"color":"ffffff00"}]},"images/剑气3":{"color":[{"color":"ffffffd4"},{"time":0.0333,"color":"ffffffff"},{"time":0.2,"color":"ffffff00","curve":"stepped"},{"time":0.2333,"color":"ffffff00"},{"time":0.4,"color":"ffffffd4"}]}},"bones":{"images/剑气1":{"scale":[{},{"time":0.0667,"x":1.084},{"time":0.2},{"time":0.2667,"x":1.084},{"time":0.4}]},"images/剑气2":{"translate":[{},{"time":0.3667,"x":12.51},{"time":0.4}],"scale":[{},{"time":0.3667,"x":1.251},{"time":0.4}]},"images/剑气3":{"translate":[{"x":5.68},{"time":0.2,"x":12.51},{"time":0.2333},{"time":0.4,"x":5.68}],"scale":[{"x":1.114},{"time":0.2,"x":1.251},{"time":0.2333},{"time":0.4,"x":1.114}]}}}}} |
||||
{"skeleton":{"hash":"DORgd4np+LknxrEWjCEEpz3Tpw8","spine":"3.8.75","x":-86.82,"y":-61.02,"width":173.43,"height":148.72},"bones":[{"name":"root"},{"name":"images/剑气1","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":9.3,"scaleX":-0.3245,"scaleY":0.3245},{"name":"images/剑气2","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":9.3,"scaleX":-0.3245,"scaleY":0.3245},{"name":"images/剑气3","parent":"root","length":167.47,"rotation":-179.53,"x":-7.89,"y":16,"scaleX":-0.3245,"scaleY":-0.3245}],"slots":[{"name":"images/剑气1","bone":"images/剑气1","attachment":"images/剑气2"},{"name":"images/剑气2","bone":"images/剑气2","attachment":"images/剑气2"},{"name":"images/剑气3","bone":"images/剑气3","attachment":"images/剑气2"}],"skins":[{"name":"default","attachments":{"images/剑气1":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416},"images/剑气33":{"x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416}},"images/剑气2":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416},"images/剑气33":{"x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416}},"images/剑气3":{"images/剑气2":{"path":"images/剑气1","x":23.93,"y":-7.12,"scaleY":-1,"rotation":-175.77,"width":502,"height":416},"images/剑气3":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416},"images/剑气33":{"x":24.05,"y":-20.96,"rotation":177.07,"width":502,"height":416}}}}],"animations":{"剑气红":{"slots":{"images/剑气1":{"attachment":[{"name":"images/剑气3"}]},"images/剑气2":{"color":[{"color":"ffffff00"},{"time":0.2,"color":"ffffffff"},{"time":0.3667,"color":"ffffff00"}],"attachment":[{"name":"images/剑气3"},{"time":0.4,"name":"images/剑气2"}]},"images/剑气3":{"color":[{"color":"ffffffd4"},{"time":0.0333,"color":"ffffffff"},{"time":0.2,"color":"ffffff00","curve":"stepped"},{"time":0.2333,"color":"ffffff00"},{"time":0.4,"color":"ffffffd4"}],"attachment":[{"name":"images/剑气3"}]}},"bones":{"images/剑气1":{"scale":[{},{"time":0.0667,"x":1.084},{"time":0.2},{"time":0.2667,"x":1.084},{"time":0.4}]},"images/剑气2":{"translate":[{},{"time":0.3667,"x":12.51},{"time":0.4}],"scale":[{},{"time":0.3667,"x":1.251},{"time":0.4}]},"images/剑气3":{"translate":[{"x":5.68},{"time":0.2,"x":12.51},{"time":0.2333},{"time":0.4,"x":5.68}],"scale":[{"x":1.114},{"time":0.2,"x":1.251},{"time":0.2333},{"time":0.4,"x":1.114}]}}},"剑气蓝":{"slots":{"images/剑气2":{"color":[{"color":"ffffff00"},{"time":0.2,"color":"ffffffff"},{"time":0.3667,"color":"ffffff00"}]},"images/剑气3":{"color":[{"color":"ffffffd4"},{"time":0.0333,"color":"ffffffff"},{"time":0.2,"color":"ffffff00","curve":"stepped"},{"time":0.2333,"color":"ffffff00"},{"time":0.4,"color":"ffffffd4"}]}},"bones":{"images/剑气1":{"scale":[{},{"time":0.0667,"x":1.084},{"time":0.2},{"time":0.2667,"x":1.084},{"time":0.4}]},"images/剑气2":{"translate":[{},{"time":0.3667,"x":12.51},{"time":0.4}],"scale":[{},{"time":0.3667,"x":1.251},{"time":0.4}]},"images/剑气3":{"translate":[{"x":5.68},{"time":0.2,"x":12.51},{"time":0.2333},{"time":0.4,"x":5.68}],"scale":[{"x":1.114},{"time":0.2,"x":1.251},{"time":0.2333},{"time":0.4,"x":1.114}]}}},"剑气金":{"slots":{"images/剑气1":{"attachment":[{"name":"images/剑气33"}]},"images/剑气2":{"color":[{"color":"ffffff00"},{"time":0.2,"color":"ffffffff"},{"time":0.3667,"color":"ffffff00"}],"attachment":[{"name":"images/剑气33"},{"time":0.4,"name":"images/剑气2"}]},"images/剑气3":{"color":[{"color":"ffffffd4"},{"time":0.0333,"color":"ffffffff"},{"time":0.2,"color":"ffffff00","curve":"stepped"},{"time":0.2333,"color":"ffffff00"},{"time":0.4,"color":"ffffffd4"}],"attachment":[{"name":"images/剑气33"}]}},"bones":{"images/剑气1":{"scale":[{},{"time":0.0667,"x":1.084},{"time":0.2},{"time":0.2667,"x":1.084},{"time":0.4}]},"images/剑气2":{"translate":[{},{"time":0.3667,"x":12.51},{"time":0.4}],"scale":[{},{"time":0.3667,"x":1.251},{"time":0.4}]},"images/剑气3":{"translate":[{"x":5.68},{"time":0.2,"x":12.51},{"time":0.2333},{"time":0.4,"x":5.68}],"scale":[{"x":1.114},{"time":0.2,"x":1.251},{"time":0.2333},{"time":0.4,"x":1.114}]}}}}} |
||||
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 202 KiB |
@ -0,0 +1,538 @@ |
||||
import { Node, Vec3, sp } from 'cc'; |
||||
import type { BattleSession, Cell, EntityId } from 'db://assets/mx/module/battle'; |
||||
import { BattleTeamId } from 'db://assets/mx/module/battle'; |
||||
import { |
||||
HealthComp, |
||||
MovementComp, |
||||
TeamComp, |
||||
TransformComp, |
||||
isBajiaoBlowRetreating, |
||||
isYanSoulClaimed, |
||||
} from 'db://assets/mx/module/battle/ecs/Components'; |
||||
import { GBundle, GPath } from '../../game/ConfigRes'; |
||||
import { BattleMapSpec } from '../map/BattleMapSpec'; |
||||
import type { MapManager } from '../map/legacy/MapManager'; |
||||
import type { Skill } from '../skill/Skill'; |
||||
import type { SkillPresentationContext } from '../skill/SkillPresentationTypes'; |
||||
import { SkillPresentationEnv } from '../skill/SkillPresentationEnv'; |
||||
import { |
||||
computeAimAngleDeg, |
||||
setNodeWorldPos, |
||||
shortestAngleDeltaDeg, |
||||
} from '../skill/SkillTransformDriver'; |
||||
import { ensureSpineSkeletonDataRuntime } from 'db://assets/mx/module/lang/spineRuntimePatch'; |
||||
import { BattleSpinePlayback } from './BattleSpinePlayback'; |
||||
import { buildShadowDealContext } from './SkillShadowContext'; |
||||
import type { ISkillPresenter } from './SkillPresenter'; |
||||
|
||||
/** battleHero/prefab/skill/冲锋 */ |
||||
const CHARGE_PREFAB = '冲锋'; |
||||
/** 朝向转速(度/秒) */ |
||||
const TURN_DEG = 540; |
||||
/** 沿路径前瞻(像素) */ |
||||
const LOOKAHEAD = 28; |
||||
/** 沿途命中半径(像素,对齐预制体半边) */ |
||||
const HIT_RADIUS = 100; |
||||
/** 冲锋直伤类型 */ |
||||
const DMG_TYPE = 'earth_charge'; |
||||
|
||||
/** Skill.skill type=1 土冲锋参数 */ |
||||
interface EarthChargeParams { |
||||
/** 冲锋速度(像素/秒) */ |
||||
speed: number; |
||||
/** 持续秒 */ |
||||
duration: number; |
||||
/** 伤害系数 */ |
||||
scale: number; |
||||
} |
||||
|
||||
/** 一次土冲锋运行态 */ |
||||
interface EarthChargeRun { |
||||
/** 施法者 */ |
||||
caster: EntityId; |
||||
/** 影子伤害上下文 */ |
||||
ctx: SkillPresentationContext; |
||||
/** 冲锋根 */ |
||||
node: Node; |
||||
/** 路径世界坐标 */ |
||||
waypoints: Vec3[]; |
||||
/** 像素/秒 */ |
||||
speed: number; |
||||
/** 持续秒 */ |
||||
duration: number; |
||||
/** 伤害系数 */ |
||||
scale: number; |
||||
/** 已过秒 */ |
||||
elapsed: number; |
||||
/** 节点朝向角 */ |
||||
angle: number; |
||||
/** 已命中 */ |
||||
hitIds: EntityId[]; |
||||
/** 上一帧世界 X */ |
||||
lastX: number; |
||||
/** 上一帧世界 Y */ |
||||
lastY: number; |
||||
} |
||||
|
||||
let _host: EarthChargeHost | null = null; |
||||
|
||||
/** 土冲锋运行时 */ |
||||
export function getEarthChargeHost(): EarthChargeHost { |
||||
if (!_host) _host = new EarthChargeHost(); |
||||
return _host; |
||||
} |
||||
|
||||
/** |
||||
* 土属性冲锋:自枪格吸附进路格生成「冲锋」预制体,沿哪吒同款进路反冲,沿途伤+击退;飞出后独立。 |
||||
*/ |
||||
export class EarthChargeHost { |
||||
private readonly _runs: EarthChargeRun[] = []; |
||||
private readonly _tmp = new Vec3(); |
||||
private readonly _aim = new Vec3(); |
||||
private readonly _from = new Vec3(); |
||||
private _hitRun: EarthChargeRun | null = null; |
||||
|
||||
/** |
||||
* 解析 `1,速度,时长,伤害万分比`。 |
||||
* @param raw Skill.skill |
||||
*/ |
||||
static parse(raw: string): EarthChargeParams | null { |
||||
const parts = String(raw ?? '').split(',').map((s) => Number(String(s).trim())); |
||||
if (parts[0] !== 1) return null; |
||||
const speed = parts[1]; |
||||
const duration = parts[2]; |
||||
const wan = parts[3]; |
||||
if (!(speed > 0) || !(duration > 0) || !(wan > 0)) { |
||||
console.log('[EarthCharge] skill 参数无效'); |
||||
return null; |
||||
} |
||||
return { speed, duration, scale: wan / 10000 }; |
||||
} |
||||
|
||||
/** |
||||
* 开战:自施法者格吸附进路生成冲锋体并立刻放锁。 |
||||
* @param ctx 表现上下文 |
||||
* @param host Skill 宿主 |
||||
*/ |
||||
start(ctx: SkillPresentationContext, host: Skill): void { |
||||
this._abortCaster(ctx.caster); |
||||
const raw = String(ctx.params.extraSkill ?? ctx.params.skillRaw ?? ''); |
||||
const params = EarthChargeHost.parse(raw); |
||||
if (!params) { |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const session = SkillPresentationEnv.getBattleSession(); |
||||
const map = SkillPresentationEnv.getMap(); |
||||
if (!session || !map) { |
||||
console.log('[EarthCharge] 无 session/map'); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const target = ctx.targets[0] ?? 0; |
||||
if (!(target > 0) || !session.world.isAlive(target)) { |
||||
console.log('[EarthCharge] 无附近怪物', target); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const fromCell = this._casterCell(session, map, ctx.caster); |
||||
if (!fromCell) { |
||||
console.log('[EarthCharge] 无施法者格', ctx.caster); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const snap = this._snapApproachCell(session, ctx.caster, fromCell); |
||||
if (!snap) { |
||||
console.log('[EarthCharge] 进路上无吸附格', fromCell); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const waypoints = this._buildRetreatWorlds(session, ctx.caster, snap, params); |
||||
if (waypoints.length < 1) { |
||||
console.log('[EarthCharge] 反向路径为空'); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
const parent = SkillPresentationEnv.flyLayer ?? map.ensureHeroParent(); |
||||
if (!parent?.isValid) { |
||||
console.log('[EarthCharge] 无父节点'); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
let node: Node | null = null; |
||||
try { |
||||
node = gg.res.getNode(GPath.HeroSkillPrefab(), CHARGE_PREFAB, GBundle.BattleHero); |
||||
} catch (err) { |
||||
console.log('[EarthCharge] getNode 失败', String(err)); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
if (!node?.isValid) { |
||||
console.log('[EarthCharge] 预制体未加载', CHARGE_PREFAB); |
||||
host.drainLogicPresentation(ctx); |
||||
return; |
||||
} |
||||
|
||||
const seq = host.beginPresentationCast(ctx); |
||||
if (!(seq > 0)) { |
||||
gg.res.putNode(node); |
||||
return; |
||||
} |
||||
host.disarmAnimComplete(); |
||||
parent.active = true; |
||||
node.active = true; |
||||
node.layer = parent.layer; |
||||
node.parent = parent; |
||||
node.setSiblingIndex(parent.children.length - 1); |
||||
node.setScale(1, 1, 1); |
||||
const start = waypoints[0]; |
||||
setNodeWorldPos(node, start); |
||||
const angle = this._chargeAimDeg(start.x, start.y, waypoints, 0) ?? 0; |
||||
node.angle = angle; |
||||
this._playPrefabAnim(node); |
||||
|
||||
const shadow = buildShadowDealContext( |
||||
ctx, |
||||
String(ctx.params.buff1 ?? ''), |
||||
String(ctx.params.buff2 ?? ''), |
||||
); |
||||
this._runs.push({ |
||||
caster: ctx.caster, |
||||
ctx: shadow, |
||||
node, |
||||
waypoints, |
||||
speed: params.speed, |
||||
duration: params.duration, |
||||
scale: params.scale, |
||||
elapsed: 0, |
||||
angle, |
||||
hitIds: [], |
||||
lastX: start.x, |
||||
lastY: start.y, |
||||
}); |
||||
ctx.releasePresentationLock(); |
||||
host.finishPresentationCast(seq, false); |
||||
} |
||||
|
||||
/** |
||||
* 推进冲锋。 |
||||
* @param dt 逻辑秒 |
||||
*/ |
||||
tick(dt: number): void { |
||||
if (!(dt > 0)) return; |
||||
for (let i = this._runs.length - 1; i >= 0; i--) { |
||||
if (!this._step(this._runs[i], dt)) { |
||||
this._finish(this._runs[i]); |
||||
this._runs.splice(i, 1); |
||||
} |
||||
} |
||||
} |
||||
|
||||
/** 结束全部冲锋 */ |
||||
abortAll(): void { |
||||
for (let i = this._runs.length - 1; i >= 0; i--) { |
||||
this._finish(this._runs[i]); |
||||
} |
||||
this._runs.length = 0; |
||||
} |
||||
|
||||
/** |
||||
* 结束该施法者未完成的冲锋。 |
||||
* @param caster 施法者 |
||||
*/ |
||||
private _abortCaster(caster: EntityId): void { |
||||
for (let i = this._runs.length - 1; i >= 0; i--) { |
||||
if (this._runs[i].caster !== caster) continue; |
||||
this._finish(this._runs[i]); |
||||
this._runs.splice(i, 1); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 单帧位移与命中。false=结束。 |
||||
* @param run 运行态 |
||||
* @param dt 逻辑秒 |
||||
*/ |
||||
private _step(run: EarthChargeRun, dt: number): boolean { |
||||
if (!run.ctx.isAlive || !run.node.isValid) return false; |
||||
run.elapsed += dt; |
||||
const cap = run.speed * Math.min(run.duration, run.elapsed); |
||||
this._pointAlong(run.waypoints, cap, this._tmp); |
||||
setNodeWorldPos(run.node, this._tmp); |
||||
run.lastX = this._tmp.x; |
||||
run.lastY = this._tmp.y; |
||||
this._turn(run, dt, this._chargeAimDeg(run.lastX, run.lastY, run.waypoints, cap)); |
||||
this._hitNear(run); |
||||
const pathLen = this._pathLen(run.waypoints); |
||||
if (run.elapsed >= run.duration || cap >= pathLen - 0.5) return false; |
||||
return true; |
||||
} |
||||
|
||||
/** |
||||
* 冲锋体附近敌对怪各伤一次(含 atk_buff 击退)。 |
||||
* @param run 运行态 |
||||
*/ |
||||
private _hitNear(run: EarthChargeRun): void { |
||||
const session = SkillPresentationEnv.getBattleSession(); |
||||
if (!session || !session.world.isAlive(run.caster)) return; |
||||
this._hitRun = run; |
||||
session.world.view(HealthComp).forEach(this._hitOne); |
||||
this._hitRun = null; |
||||
} |
||||
|
||||
/** |
||||
* 单体命中。 |
||||
* @param id 实体 |
||||
* @param hp 生命 |
||||
*/ |
||||
private readonly _hitOne = (id: EntityId, hp: HealthComp): void => { |
||||
const run = this._hitRun; |
||||
const session = SkillPresentationEnv.getBattleSession(); |
||||
if (!run || !session) return; |
||||
if (id === run.caster) return; |
||||
if (this._alreadyHit(run, id)) return; |
||||
if (!session.world.isAlive(id) || !(hp.hp > 0)) return; |
||||
const move = session.world.getComponent(id, MovementComp); |
||||
if (move?.spawnProtected || isYanSoulClaimed(move) || isBajiaoBlowRetreating(move)) return; |
||||
const casterTeam = session.world.getComponent(run.caster, TeamComp); |
||||
if (!BattleTeamId.isHostile(casterTeam, session.world.getComponent(id, TeamComp))) return; |
||||
const wp = SkillPresentationEnv.getTargetWorldPos(id); |
||||
if (!wp) return; |
||||
const dx = wp.x - run.lastX; |
||||
const dy = wp.y - run.lastY; |
||||
if (dx * dx + dy * dy > HIT_RADIUS * HIT_RADIUS) return; |
||||
run.hitIds.push(id); |
||||
run.ctx.dealDamage(id, { scale: run.scale, damageType: DMG_TYPE }); |
||||
}; |
||||
|
||||
/** |
||||
* 是否已命中。 |
||||
* @param run 运行态 |
||||
* @param id 实体 |
||||
*/ |
||||
private _alreadyHit(run: EarthChargeRun, id: EntityId): boolean { |
||||
const ids = run.hitIds; |
||||
for (let i = 0; i < ids.length; i++) { |
||||
if (ids[i] === id) return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
/** |
||||
* 回收冲锋体。 |
||||
* @param run 运行态 |
||||
*/ |
||||
private _finish(run: EarthChargeRun): void { |
||||
if (!run.node?.isValid) return; |
||||
const list = run.node.getComponentsInChildren(sp.Skeleton); |
||||
for (let i = 0; i < list.length; i++) { |
||||
BattleSpinePlayback.clearPendingComplete(list[i]); |
||||
} |
||||
run.node.angle = 0; |
||||
run.node.setScale(1, 1, 1); |
||||
gg.res.putNode(run.node); |
||||
} |
||||
|
||||
/** |
||||
* 施法者落点格(Transform / 地图格,禁 session.grid.worldToCell——世界坐标原点与逻辑格不一致)。 |
||||
* @param session 会话 |
||||
* @param map 地图 |
||||
* @param caster 施法者 |
||||
*/ |
||||
private _casterCell(session: BattleSession, map: MapManager, caster: EntityId): Cell | null { |
||||
const tf = session.world.getComponent(caster, TransformComp); |
||||
if (tf && session.grid.inBounds({ row: tf.row, col: tf.col })) { |
||||
return { row: tf.row, col: tf.col }; |
||||
} |
||||
const center = SkillPresentationEnv.getCasterGridCenter(caster); |
||||
if (!center) return null; |
||||
const mg = map.getMapGridByWorldPos(center); |
||||
if (!mg) return null; |
||||
return { row: mg.Row, col: mg.Col }; |
||||
} |
||||
|
||||
/** |
||||
* 攻我方进路上离枪格最近的格;同距优先枪格正下方(更大 row)。 |
||||
* @param session 会话 |
||||
* @param caster 施法者 |
||||
* @param from 施法者格 |
||||
*/ |
||||
private _snapApproachCell(session: BattleSession, caster: EntityId, from: Cell): { Row: number; Col: number } | null { |
||||
const enemyPort = this._enemyPort(session, caster); |
||||
const spawn = session.topology.getSpawnCell(enemyPort); |
||||
if (!spawn) { |
||||
console.log('[EarthCharge] 敌方出怪口缺失', enemyPort); |
||||
return null; |
||||
} |
||||
const forward = session.pathfinder.getApproachPath(spawn, enemyPort); |
||||
if (forward.length < 1) return null; |
||||
// 枪格正下方若在进路上,优先落该格
|
||||
const belowRow = from.row + 1; |
||||
for (let i = 0; i < forward.length; i++) { |
||||
if (forward[i].row === belowRow && forward[i].col === from.col) { |
||||
return { Row: forward[i].row, Col: forward[i].col }; |
||||
} |
||||
} |
||||
let best = 0; |
||||
let bestD = Number.POSITIVE_INFINITY; |
||||
let bestRow = Number.NEGATIVE_INFINITY; |
||||
for (let i = 0; i < forward.length; i++) { |
||||
const d = Math.abs(forward[i].row - from.row) + Math.abs(forward[i].col - from.col); |
||||
if (d < bestD || (d === bestD && forward[i].row > bestRow)) { |
||||
bestD = d; |
||||
bestRow = forward[i].row; |
||||
best = i; |
||||
} |
||||
} |
||||
return { Row: forward[best].row, Col: forward[best].col }; |
||||
} |
||||
|
||||
/** |
||||
* 攻向施法者阵营的出怪口。 |
||||
* @param session 会话 |
||||
* @param caster 施法者 |
||||
*/ |
||||
private _enemyPort(session: BattleSession, caster: EntityId): number { |
||||
const team = session.world.getComponent(caster, TeamComp); |
||||
const owner = team?.ownerId ?? team?.team ?? 0; |
||||
return owner === 0 ? 1 : 2; |
||||
} |
||||
|
||||
/** |
||||
* 从吸附格沿进路退向敌方出怪口。 |
||||
* @param session 会话 |
||||
* @param caster 施法者 |
||||
* @param snap 吸附格 |
||||
* @param params 配表 |
||||
*/ |
||||
private _buildRetreatWorlds(session: BattleSession, caster: EntityId, snap: { Row: number; Col: number }, params: EarthChargeParams): Vec3[] { |
||||
const enemyPort = this._enemyPort(session, caster); |
||||
const spawn = session.topology.getSpawnCell(enemyPort); |
||||
if (!spawn) { |
||||
console.log('[EarthCharge] 敌方出怪口缺失', enemyPort); |
||||
return []; |
||||
} |
||||
const cellSize = Math.max(1, BattleMapSpec.CELL_SIZE); |
||||
const maxSteps = Math.ceil(params.speed * params.duration / cellSize) + 8; |
||||
const from: Cell = { row: snap.Row, col: snap.Col }; |
||||
const cells = session.pathfinder.buildRetreatPath(from, maxSteps, spawn, enemyPort); |
||||
const out: Vec3[] = []; |
||||
for (let i = 0; i < cells.length; i++) { |
||||
const w = SkillPresentationEnv.getGridWorldCenterByRowCol(cells[i].row, cells[i].col); |
||||
if (w) out.push(w.clone()); |
||||
} |
||||
return out; |
||||
} |
||||
|
||||
/** |
||||
* 沿折线取点。 |
||||
* @param points 路点 |
||||
* @param dist 路程 |
||||
* @param out 输出 |
||||
*/ |
||||
private _pointAlong(points: readonly Vec3[], dist: number, out: Vec3): void { |
||||
if (points.length === 0) { |
||||
out.set(0, 0, 0); |
||||
return; |
||||
} |
||||
if (points.length === 1 || dist <= 0) { |
||||
out.set(points[0].x, points[0].y, points[0].z); |
||||
return; |
||||
} |
||||
let left = dist; |
||||
for (let i = 0; i < points.length - 1; i++) { |
||||
const a = points[i]; |
||||
const b = points[i + 1]; |
||||
const dx = b.x - a.x; |
||||
const dy = b.y - a.y; |
||||
const seg = Math.sqrt(dx * dx + dy * dy); |
||||
if (seg <= 1e-4) continue; |
||||
if (left <= seg) { |
||||
const t = left / seg; |
||||
out.set(a.x + dx * t, a.y + dy * t, a.z); |
||||
return; |
||||
} |
||||
left -= seg; |
||||
} |
||||
const last = points[points.length - 1]; |
||||
out.set(last.x, last.y, last.z); |
||||
} |
||||
|
||||
/** |
||||
* 折线总长。 |
||||
* @param points 路点 |
||||
*/ |
||||
private _pathLen(points: readonly Vec3[]): number { |
||||
let len = 0; |
||||
for (let i = 0; i < points.length - 1; i++) { |
||||
const dx = points[i + 1].x - points[i].x; |
||||
const dy = points[i + 1].y - points[i].y; |
||||
len += Math.sqrt(dx * dx + dy * dy); |
||||
} |
||||
return len; |
||||
} |
||||
|
||||
/** |
||||
* 播预制体默认循环动画。 |
||||
* @param root 冲锋根 |
||||
*/ |
||||
private _playPrefabAnim(root: Node): void { |
||||
const sk = root.getComponent(sp.Skeleton) ?? root.getComponentInChildren(sp.Skeleton); |
||||
if (!sk?.isValid) { |
||||
console.warn('[EarthCharge] 缺 Spine'); |
||||
return; |
||||
} |
||||
if (sk.skeletonData) ensureSpineSkeletonDataRuntime(sk.skeletonData); |
||||
const typed = sk as sp.Skeleton & { defaultAnimation?: string }; |
||||
const name = String(typed.defaultAnimation || sk.animation || '').trim(); |
||||
if (!name) { |
||||
console.warn('[EarthCharge] 无默认动画'); |
||||
return; |
||||
} |
||||
BattleSpinePlayback.play(sk, name, { loop: true, optional: true }); |
||||
} |
||||
|
||||
/** |
||||
* 节点对准冲锋前方。 |
||||
* @param run 运行态 |
||||
* @param dt 逻辑秒 |
||||
* @param desired 目标角 |
||||
*/ |
||||
private _turn(run: EarthChargeRun, dt: number, desired: number | null): void { |
||||
if (desired == null || !run.node.isValid) return; |
||||
const delta = shortestAngleDeltaDeg(run.angle, desired); |
||||
const maxStep = TURN_DEG * dt; |
||||
const step = delta > maxStep ? maxStep : (delta < -maxStep ? -maxStep : delta); |
||||
run.angle += step; |
||||
run.node.angle = run.angle; |
||||
} |
||||
|
||||
/** |
||||
* 沿路径前瞻朝向(度,0=右)。 |
||||
* @param fromX 当前 X |
||||
* @param fromY 当前 Y |
||||
* @param waypoints 路点 |
||||
* @param traveled 已走路程 |
||||
*/ |
||||
private _chargeAimDeg(fromX: number, fromY: number, waypoints: readonly Vec3[], traveled: number): number | null { |
||||
this._from.set(fromX, fromY, 0); |
||||
this._pointAlong(waypoints, traveled + LOOKAHEAD, this._aim); |
||||
return computeAimAngleDeg(this._from, this._aim); |
||||
} |
||||
} |
||||
|
||||
/** Skill.skill type=1 土冲锋入口 */ |
||||
export class EarthChargePresenter implements ISkillPresenter { |
||||
/** |
||||
* 播放土冲锋。 |
||||
* @param ctx 表现上下文 |
||||
* @param host Skill 宿主 |
||||
*/ |
||||
present(ctx: SkillPresentationContext, host: Skill): void { |
||||
if (!ctx.isAlive) { |
||||
ctx.finish(); |
||||
return; |
||||
} |
||||
getEarthChargeHost().start(ctx, host); |
||||
} |
||||
} |
||||
@ -0,0 +1,9 @@ |
||||
{ |
||||
"ver": "4.0.24", |
||||
"importer": "typescript", |
||||
"imported": true, |
||||
"uuid": "226cc175-37c2-4371-bfcc-765f604f1c9c", |
||||
"files": [], |
||||
"subMetas": {}, |
||||
"userData": {} |
||||
} |
||||
@ -0,0 +1,46 @@ |
||||
<html> |
||||
<head> |
||||
<link rel="icon" href="./favicon.ico" /> |
||||
<meta charset="utf-8" /> |
||||
<title><%=title%></title> |
||||
<meta |
||||
name="viewport" |
||||
content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true" |
||||
/> |
||||
<meta name="apple-mobile-web-app-capable" content="yes" /> |
||||
<meta name="mobile-web-app-capable" content="yes"> |
||||
<meta name="full-screen" content="yes" /> |
||||
<meta name="screen-orientation" content="portrait" /> |
||||
<meta name="x5-fullscreen" content="true" /> |
||||
<meta name="360-fullscreen" content="true" /> |
||||
<meta name="renderer" content="webkit" /> |
||||
<meta name="force-rendering" content="webkit" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
||||
|
||||
<link rel="stylesheet" type="text/css" href="./index.css" /> |
||||
</head> |
||||
<body style="overflow: hidden;"> |
||||
<%- include(cocosToolBar, {config: config}) %> |
||||
<div id="content" class="content" style="overflow: hidden;"> |
||||
<div class="contentWrap"> |
||||
<div id="GameDiv" class="wrapper"> |
||||
<div id="Cocos3dGameContainer"> |
||||
<canvas id="GameCanvas" tabindex="-1" style="background-color: '';"></canvas> |
||||
</div> |
||||
<div id="splash"> |
||||
<div class="progress-bar stripes"><span></span></div> |
||||
</div> |
||||
<div id="bulletin"> |
||||
<div id="sceneIsEmpty" class="inner"><%=tip_sceneIsEmpty%></div> |
||||
</div> |
||||
<div class="error" id="error"> |
||||
<div class="title">Error <i>(Please open the console to see detailed errors)</i></div> |
||||
<div class="error-main"></div> |
||||
<div class="error-stack"></div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<%- include(cocosTemplate, {}) %> |
||||
</body> |
||||
</html> |
||||