替换美术资源

master
humingxing 4 hours ago
parent 24c424810a
commit efc1416b2f
  1. 54
      assets/bundles/battleGame/prefab/宝箱.prefab
  2. 73
      assets/res/popCommon/texture/popimg/match/spine/匹配中.atlas
  3. 2
      assets/res/popCommon/texture/popimg/match/spine/匹配中.json
  4. BIN
      assets/res/popCommon/texture/popimg/match/spine/匹配中.png
  5. 62
      assets/res/popCommon/texture/popimg/match/spine/匹配中.png.meta
  6. 9
      assets/res/spine/宝箱打开.meta
  7. 1
      assets/res/spine/宝箱打开/.WeDrive
  8. 9
      assets/res/spine/宝箱打开/宝箱打开JSON.meta
  9. 1
      assets/res/spine/宝箱打开/宝箱打开JSON/.WeDrive
  10. 76
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.atlas
  11. 12
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.atlas.meta
  12. 1
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.json
  13. 13
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.json.meta
  14. BIN
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.png
  15. 134
      assets/res/spine/宝箱打开/宝箱打开JSON/xiangzi2.png.meta
  16. 2
      assets/res/spine/正在加载/.WeDrive
  17. 59
      assets/res/spine/正在加载/正在加载.atlas
  18. 2
      assets/res/spine/正在加载/正在加载.atlas.meta
  19. 2
      assets/res/spine/正在加载/正在加载.json
  20. 4
      assets/res/spine/正在加载/正在加载.json.meta
  21. BIN
      assets/res/spine/正在加载/正在加载.png
  22. 58
      assets/res/spine/正在加载/正在加载.png.meta
  23. 40
      assets/scene/main.scene
  24. 112
      assets/script/battle/map/MapDigChestHost.ts
  25. 61
      assets/script/battle/presentation/BattleSpinePlayback.ts
  26. 5
      assets/script/battle/view/CocosBagBoardView.ts
  27. 115
      assets/script/ui/BattleGame/BattleDigChestFxPresenter.ts
  28. 9
      assets/script/ui/BattleGame/BattleDigChestFxPresenter.ts.meta
  29. 51
      assets/script/ui/BattleGame/UIBattleGame.ts
  30. 8
      docs/方案-局内Battlebuff三选一.md
  31. 15
      docs/需求-开挖宝箱.md
  32. 67
      preview-template/workbench/css/workbench.css

@ -62,7 +62,7 @@
},
{
"__type__": "cc.Node",
"_name": "box",
"_name": "anim",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
@ -84,7 +84,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -2.64,
"y": 0,
"z": 0
},
"_lrot": {
@ -124,22 +124,22 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 48,
"height": 39
"width": 119.69999694824219,
"height": 113.69999694824219
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
"x": 0.5030910840101527,
"y": 0.4317502328072563
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "3c7wrtDV1CJ6wben99cdUf"
"fileId": "5cmhSRUchMHZXAX8abh7Aj"
},
{
"__type__": "cc.Sprite",
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
@ -160,28 +160,28 @@
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "c284dbf4-a1a8-413d-8d01-7f5fdfaa15dd@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,
"_skeletonData": {
"__uuid__": "7b662a97-3ca9-42ab-b43b-8977019688f5",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "red",
"defaultAnimation": "play",
"_premultipliedAlpha": true,
"_timeScale": 1,
"_preCacheMode": 0,
"_cacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0bX4WRHEZG/ruUMZuQIumt"
"fileId": "12vv/OjoJC/6WRt//rEKNw"
},
{
"__type__": "cc.PrefabInfo",
@ -191,7 +191,7 @@
"asset": {
"__id__": 0
},
"fileId": "1elxSYwQBKopyaVp9y4v2w",
"fileId": "22tjk2w5VA26ktARcMR+eX",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null

@ -1,69 +1,48 @@
匹配中.png
size: 1519,602
size: 1104,1104
format: RGBA8888
filter: Linear,Linear
repeat: none
中
rotate: true
xy: 1381, 300
size: 63, 78
orig: 65, 80
offset: 1, 1
index: -1
匹
12a
rotate: false
xy: 1104, 266
size: 68, 57
orig: 70, 59
offset: 1, 1
xy: 0, 384
size: 380, 380
orig: 393, 392
offset: 8, 4
index: -1
圆点
VS
rotate: false
xy: 1104, 325
size: 275, 277
orig: 285, 290
offset: 6, 8
xy: 0, 156
size: 252, 226
orig: 252, 226
offset: 0, 0
index: -1
对称光
rotate: false
xy: 0, 266
xy: 0, 766
size: 1102, 336
orig: 1102, 345
offset: 0, 5
index: -1
战
rotate: true
xy: 1376, 146
size: 152, 143
orig: 154, 145
offset: 1, 1
index: -1
速度线
rotate: true
xy: 1381, 435
size: 167, 94
orig: 183, 108
offset: 9, 4
index: -1
配
红方
rotate: false
xy: 1381, 365
size: 78, 68
orig: 80, 70
offset: 1, 1
xy: 382, 468
size: 474, 147
orig: 474, 147
offset: 0, 0
index: -1
飘带1
蓝色
rotate: false
xy: 0, 0
size: 686, 264
orig: 686, 264
xy: 382, 617
size: 474, 147
orig: 474, 147
offset: 0, 0
index: -1
飘带2
速度线
rotate: false
xy: 688, 0
size: 686, 264
orig: 686, 264
offset: 0, 0
xy: 858, 670
size: 167, 94
orig: 183, 108
offset: 9, 4
index: -1

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 KiB

After

Width:  |  Height:  |  Size: 165 KiB

@ -41,14 +41,14 @@
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"offsetX": -1,
"offsetY": -77,
"trimX": 0,
"trimY": 0,
"width": 1519,
"height": 602,
"rawWidth": 1519,
"rawHeight": 602,
"trimY": 156,
"width": 1102,
"height": 946,
"rawWidth": 1104,
"rawHeight": 1104,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -60,17 +60,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-759.5,
-301,
-551,
-473,
0,
759.5,
-301,
551,
-473,
0,
-759.5,
301,
-551,
473,
0,
759.5,
301,
551,
473,
0
],
"indexes": [
@ -83,32 +83,32 @@
],
"uv": [
0,
602,
1519,
602,
948,
1102,
948,
0,
0,
1519,
0
2,
1102,
2
],
"nuv": [
0,
0.0018115942028985507,
0.9981884057971014,
0.0018115942028985507,
0,
1,
0,
0,
1,
1,
1
0.8586956521739131,
0.9981884057971014,
0.8586956521739131
],
"minPos": [
-759.5,
-301,
-551,
-473,
0
],
"maxPos": [
759.5,
301,
551,
473,
0
]
},

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "5031b965-b75f-43f3-b853-5a96fdaa5d0d",
"files": [],
"subMetas": {},
"userData": {}
}

@ -0,0 +1 @@
D:\WXWork\1688855084654441\WeDrive\中昱智云\抖音游戏\战斗类\【新】2048数字守卫战\动效\宝箱打开

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "0e2ea3ab-53f3-4d87-832b-91c723ceee29",
"files": [],
"subMetas": {},
"userData": {}
}

@ -0,0 +1 @@
D:\WXWork\1688855084654441\WeDrive\中昱智云\抖音游戏\战斗类\【新】2048数字守卫战\动效\宝箱打开\宝箱打开JSON

@ -0,0 +1,76 @@
xiangzi2.png
size: 272,272
format: RGBA8888
filter: Linear,Linear
repeat: none
h_1
rotate: false
xy: 82, 31
size: 20, 22
orig: 20, 22
offset: 0, 0
index: -1
h_10
rotate: false
xy: 0, 168
size: 104, 104
orig: 120, 114
offset: 8, 2
index: -1
h_2
rotate: false
xy: 12, 3
size: 7, 7
orig: 10, 10
offset: 1, 2
index: -1
h_3
rotate: false
xy: 12, 3
size: 7, 7
orig: 10, 10
offset: 1, 2
index: -1
h_4
rotate: false
xy: 12, 3
size: 7, 7
orig: 10, 10
offset: 1, 2
index: -1
h_5
rotate: false
xy: 0, 0
size: 10, 10
orig: 13, 13
offset: 1, 2
index: -1
h_6
rotate: false
xy: 0, 0
size: 10, 10
orig: 13, 13
offset: 1, 2
index: -1
h_8
rotate: false
xy: 0, 79
size: 82, 87
orig: 82, 87
offset: 0, 0
index: -1
h_9
rotate: false
xy: 0, 12
size: 80, 65
orig: 86, 71
offset: 3, 3
index: -1
l_77
rotate: true
xy: 82, 55
size: 22, 21
orig: 23, 23
offset: 1, 1
index: -1

@ -0,0 +1,12 @@
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "0af7ee96-c5d5-4b00-916b-3f4a773b9067",
"files": [
".atlas",
".json"
],
"subMetas": {},
"userData": {}
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,13 @@
{
"ver": "1.2.7",
"importer": "spine-data",
"imported": true,
"uuid": "7b662a97-3ca9-42ab-b43b-8977019688f5",
"files": [
".json"
],
"subMetas": {},
"userData": {
"atlasUuid": "0af7ee96-c5d5-4b00-916b-3f4a773b9067"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -0,0 +1,134 @@
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "6bd5b27b-f93f-4fd0-88c8-226764410577",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "6bd5b27b-f93f-4fd0-88c8-226764410577@6c48a",
"displayName": "xiangzi2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "6bd5b27b-f93f-4fd0-88c8-226764410577",
"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": "6bd5b27b-f93f-4fd0-88c8-226764410577@f9941",
"displayName": "xiangzi2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": -84,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 104,
"height": 272,
"rawWidth": 272,
"rawHeight": 272,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-52,
-136,
0,
52,
-136,
0,
-52,
136,
0,
52,
136,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
272,
104,
272,
0,
0,
104,
0
],
"nuv": [
0,
0,
0.38235294117647056,
0,
0,
1,
0.38235294117647056,
1
],
"minPos": [
-52,
-136,
0
],
"maxPos": [
52,
136,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "6bd5b27b-f93f-4fd0-88c8-226764410577@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "6bd5b27b-f93f-4fd0-88c8-226764410577@6c48a"
}
}

@ -1 +1 @@
D:\WXWork\1688855084654441\WeDrive\中昱智云\抖音游戏\战斗类\【新】西游文字塔防\动效\正在加载
D:\WXWork\1688855084654441\WeDrive\中昱智云\抖音游戏\战斗类\【新】2048数字守卫战\动效\正在加载

@ -1,48 +1,41 @@
正在加载.png
size: 389,155
size: 284,284
format: RGBA8888
filter: Linear,Linear
repeat: none
云层1
大星球
rotate: false
xy: 290, 0
size: 69, 37
orig: 71, 39
offset: 1, 1
index: -1
云层2
rotate: true
xy: 341, 101
size: 54, 30
orig: 56, 32
offset: 1, 1
xy: 0, 112
size: 172, 172
orig: 176, 176
offset: 2, 2
index: -1
云层3
rotate: true
xy: 361, 23
size: 76, 28
orig: 78, 30
撞色标题
rotate: false
xy: 0, 31
size: 220, 79
orig: 222, 81
offset: 1, 1
index: -1
云层4
rotate: true
xy: 290, 39
size: 116, 49
orig: 118, 51
offset: 1, 1
星球
rotate: false
xy: 174, 227
size: 57, 57
orig: 61, 61
offset: 2, 2
index: -1
正在加载
轨迹1
rotate: false
xy: 0, 1
size: 288, 154
orig: 290, 156
xy: 0, 0
size: 229, 29
orig: 231, 31
offset: 1, 1
index: -1
点
rotate: false
xy: 361, 3
size: 18, 18
orig: 20, 20
轨迹2
rotate: true
xy: 233, 55
size: 229, 26
orig: 231, 28
offset: 1, 1
index: -1

@ -2,7 +2,7 @@
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "ce32d1f0-1767-45e4-903c-cbbbe3fa3b75",
"uuid": "3ee65091-bbff-4ca6-b636-cd219a3f8a38",
"files": [
".atlas",
".json"

@ -1 +1 @@
{"skeleton":{"hash":"sBHrWRenlj+WCimdNiB1EH2cJ3g","spine":"3.8.75","x":-155,"y":-67,"width":317,"height":176,"images":"./images/","audio":"E:/工作文件/1项目汇总/5战斗游戏/V4/动效/加载动画"},"bones":[{"name":"root"},{"name":"bone","parent":"root","length":30.47,"rotation":-91.59,"x":1.17,"y":-5.21},{"name":"点","parent":"bone","x":45.77,"y":73.63},{"name":"云层4","parent":"bone","length":25.83,"rotation":-85.59,"x":-44.17,"y":-100.67},{"name":"云层2","parent":"bone","length":21.17,"rotation":89.3,"x":-98.76,"y":-39.98},{"name":"云层3","parent":"bone","length":25.38,"rotation":91.59,"x":-78.89,"y":67.63},{"name":"云层1","parent":"bone","length":22,"rotation":92.69,"x":-48.73,"y":124.33},{"name":"点2","parent":"bone","x":44.94,"y":103.72},{"name":"点3","parent":"bone","x":44.08,"y":134.72}],"slots":[{"name":"云层4","bone":"云层4","attachment":"云层4"},{"name":"云层3","bone":"云层3","attachment":"云层3"},{"name":"云层2","bone":"云层2","attachment":"云层2"},{"name":"云层1","bone":"云层1","attachment":"云层1"},{"name":"正在加载","bone":"root","attachment":"正在加载"},{"name":"点","bone":"点","attachment":"点"},{"name":"点2","bone":"点2","attachment":"点"},{"name":"点3","bone":"点3","attachment":"点"}],"skins":[{"name":"default","attachments":{"云层1":{"云层1":{"x":-0.32,"y":-0.55,"rotation":-1.1,"width":71,"height":39}},"云层2":{"云层2":{"x":0.11,"y":-1.62,"rotation":2.29,"width":56,"height":32}},"云层3":{"云层3":{"x":-5.97,"y":1.22,"width":78,"height":30}},"云层4":{"云层4":{"x":-4.21,"y":0.45,"rotation":177.18,"width":118,"height":51}},"正在加载":{"正在加载":{"x":-10,"y":11,"width":290,"height":156}},"点2":{"点":{"x":-0.99,"y":-0.53,"rotation":91.59,"width":20,"height":20}},"点3":{"点":{"x":-0.99,"y":-0.53,"rotation":91.59,"width":20,"height":20}},"点":{"点":{"x":-0.99,"y":-0.53,"rotation":91.59,"width":20,"height":20}}}}],"animations":{"正在加载":{"slots":{"点2":{"color":[{"color":"ffffff00","curve":"stepped"},{"time":0.5,"color":"ffffff00"},{"time":0.6667,"color":"ffffffff","curve":"stepped"},{"time":1.1667,"color":"ffffffff"},{"time":1.5,"color":"ffffff00"}]},"点":{"color":[{"color":"ffffff00"},{"time":0.1667,"color":"ffffffff","curve":"stepped"},{"time":0.6667,"color":"ffffffff"},{"time":1,"color":"ffffff00"}]},"点3":{"color":[{"color":"ffffff00","curve":"stepped"},{"time":1,"color":"ffffff00"},{"time":1.1667,"color":"ffffffff","curve":"stepped"},{"time":1.6667,"color":"ffffffff"},{"time":2,"color":"ffffff00"}]}},"bones":{"云层4":{"translate":[{"curve":0.25,"c3":0.75},{"time":1,"x":0.55,"y":-19.9,"curve":0.25,"c3":0.75},{"time":2}]},"云层2":{"translate":[{"x":-1.75,"y":-3.33,"curve":0.382,"c2":0.57,"c3":0.735},{"time":0.3333},{"time":1.3333,"x":-6.16,"y":-11.75,"curve":0.243,"c3":0.649,"c4":0.6},{"time":2,"x":-1.75,"y":-3.33}]},"云层3":{"translate":[{"x":-12.39,"y":9.28,"curve":0.311,"c2":0.25,"c3":0.757},{"time":0.8333},{"time":1.8333,"x":-13.72,"y":10.27,"curve":0.29,"c3":0.629,"c4":0.38},{"time":2,"x":-12.39,"y":9.28}]},"云层1":{"translate":[{"x":-0.31,"y":11.34,"curve":0.375,"c2":0.5,"c3":0.75},{"time":0.5,"x":-0.63,"y":22.68,"curve":0.25,"c3":0.75},{"time":1.5,"curve":0.25,"c3":0.625,"c4":0.5},{"time":2,"x":-0.31,"y":11.34}]}}}}}
{"skeleton":{"hash":"NTrQs4MH8Fam8f0OG/6ALJZTnFE","spine":"3.8.75","x":-144.67,"y":-119.49,"width":258.67,"height":239.49},"bones":[{"name":"root"},{"name":"轨迹2","parent":"root","length":34.04,"x":-1.69,"y":20.97},{"name":"星球","parent":"轨迹2","x":-109.52,"y":4.44},{"name":"撞色标题","parent":"root","length":41.76,"rotation":-91.24,"x":-2.99,"y":-81.92}],"slots":[{"name":"撞色标题","bone":"撞色标题","attachment":"撞色标题"},{"name":"轨迹2","bone":"轨迹2","attachment":"轨迹2"},{"name":"大星球","bone":"root","attachment":"大星球"},{"name":"轨迹1","bone":"轨迹2","attachment":"轨迹1"},{"name":"root33","bone":"root","attachment":"root33"},{"name":"星球","bone":"星球","attachment":"星球"},{"name":"星球2","bone":"星球","attachment":"星球"},{"name":"轨迹22","bone":"轨迹2","attachment":"轨迹22"}],"path":[{"name":"轨迹22","bones":["星球"],"target":"轨迹22","rotateMix":0}],"skins":[{"name":"default","attachments":{"轨迹1":{"轨迹1":{"x":0.19,"y":-9.47,"width":231,"height":31}},"轨迹2":{"轨迹2":{"x":0.19,"y":18.03,"width":231,"height":28}},"root33":{"root33":{"type":"clipping","end":"星球","vertexCount":27,"vertices":[-62.88,4.79,-69.14,24.24,-68.05,45.86,-60.57,65.18,-48.74,80.54,-34.19,91.42,-15.01,97.68,2.67,99.18,22.33,95.7,39.39,85.59,53.61,100.66,61.53,170.28,-146.98,167.98,-180.99,-68.07,166.46,-65.38,139.74,154.36,54.05,100.31,39.9,85.13,57.6,66.24,65.82,41.3,64.97,17.34,53.86,-7.46,34.69,-25.49,14.1,-33.73,-10.18,-35.15,-32.47,-29.04,-52.92,-12.71]}},"星球":{"星球":{"x":-0.29,"y":0.09,"width":61,"height":61}},"撞色标题":{"撞色标题":{"x":-4.46,"y":3.95,"rotation":90.49,"width":222,"height":81}},"轨迹22":{"轨迹22":{"type":"path","closed":true,"lengths":[117.47,238.92,355,456.31],"vertexCount":12,"vertices":[-102.14,22.89,-112.19,4.56,-117.05,-4.31,-74.97,-22.7,-1.78,-22.17,70.44,-21.65,115.9,-8.92,111,5.78,106.1,20.48,41.42,27.59,-0.96,27.59,-43.34,27.59]}},"大星球":{"大星球":{"x":-2,"y":32,"width":176,"height":176}},"星球2":{"星球":{"x":-0.29,"y":0.09,"width":61,"height":61}}}}],"animations":{"animation":{"bones":{"轨迹2":{"rotate":[{"curve":0.25,"c3":0.75},{"time":1.5,"angle":-16.47,"curve":0.25,"c3":0.75},{"time":3}]},"撞色标题":{"scale":[{"curve":0.25,"c3":0.75},{"time":0.7667,"x":1.033,"y":1.033,"curve":0.25,"c3":0.75},{"time":1.5,"curve":0.25,"c3":0.75},{"time":2.2667,"x":1.033,"y":1.033,"curve":0.25,"c3":0.75},{"time":3}]}},"path":{"轨迹22":{"position":[{"curve":0.25,"c3":0.75},{"time":1.5,"position":0.5,"curve":0.25,"c3":0.75},{"time":3,"position":1}]}},"drawOrder":[{"time":1.8,"offsets":[{"slot":"星球2","offset":-6}]}]}}}

@ -2,12 +2,12 @@
"ver": "1.2.7",
"importer": "spine-data",
"imported": true,
"uuid": "f0411521-9178-487c-84f0-71352fc313fa",
"uuid": "5bdf0cb1-f6fd-4f47-8c6a-d86af4205c40",
"files": [
".json"
],
"subMetas": {},
"userData": {
"atlasUuid": "ce32d1f0-1767-45e4-903c-cbbbe3fa3b75"
"atlasUuid": "3ee65091-bbff-4ca6-b636-cd219a3f8a38"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 58 KiB

@ -2,7 +2,7 @@
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "e09564ef-0694-492c-9f08-8ab2877da248",
"uuid": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350",
"files": [
".json",
".png"
@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "e09564ef-0694-492c-9f08-8ab2877da248@6c48a",
"uuid": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350@6c48a",
"displayName": "正在加载",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "e09564ef-0694-492c-9f08-8ab2877da248",
"imageUuidOrDatabaseUri": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@ -34,21 +34,21 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "e09564ef-0694-492c-9f08-8ab2877da248@f9941",
"uuid": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350@f9941",
"displayName": "正在加载",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetX": -12.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 389,
"height": 155,
"rawWidth": 389,
"rawHeight": 155,
"width": 259,
"height": 284,
"rawWidth": 284,
"rawHeight": 284,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -60,17 +60,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-194.5,
-77.5,
-129.5,
-142,
0,
194.5,
-77.5,
129.5,
-142,
0,
-194.5,
77.5,
-129.5,
142,
0,
194.5,
77.5,
129.5,
142,
0
],
"indexes": [
@ -83,37 +83,37 @@
],
"uv": [
0,
155,
389,
155,
284,
259,
284,
0,
0,
389,
259,
0
],
"nuv": [
0,
0,
1,
0.9119718309859155,
0,
0,
1,
1,
0.9119718309859155,
1
],
"minPos": [
-194.5,
-77.5,
-129.5,
-142,
0
],
"maxPos": [
194.5,
77.5,
129.5,
142,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "e09564ef-0694-492c-9f08-8ab2877da248@6c48a",
"imageUuidOrDatabaseUri": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350@6c48a",
"atlasUuid": "",
"trimType": "auto"
},
@ -129,6 +129,6 @@
"type": "sprite-frame",
"fixAlphaTransparencyArtifacts": false,
"hasAlpha": true,
"redirect": "e09564ef-0694-492c-9f08-8ab2877da248@6c48a"
"redirect": "9f0a6e8d-455a-4f4f-b7a0-86236e7ab350@6c48a"
}
}

@ -102,7 +102,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 375,
"y": 799.9999999999999,
"y": 800,
"z": 0
},
"_lrot": {
@ -187,7 +187,7 @@
"_priority": 1,
"_fov": 45,
"_fovAxis": 0,
"_orthoHeight": 799.9999999999999,
"_orthoHeight": 800,
"_near": 0,
"_far": 2000,
"_color": {
@ -2102,13 +2102,13 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 317,
"height": 176
"width": 258.6700134277344,
"height": 239.49000549316406
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.4889589905362776,
"y": 0.3806818181818182
"x": 0.559283993733438,
"y": 0.4989352170154768
},
"_id": "05W30/lrZA7YTdNKdh1GB1"
},
@ -2133,11 +2133,11 @@
"a": 255
},
"_skeletonData": {
"__uuid__": "f0411521-9178-487c-84f0-71352fc313fa",
"__uuid__": "5bdf0cb1-f6fd-4f47-8c6a-d86af4205c40",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "正在加载",
"defaultAnimation": "animation",
"_premultipliedAlpha": false,
"_timeScale": 1,
"_preCacheMode": 0,
@ -2477,7 +2477,7 @@
"y": 0,
"z": 0
},
"_id": "0fCRhAyIxGjrxCApwoLkHc"
"_id": "7epkFZABBDMbaajkd6Yu/m"
},
{
"__type__": "cc.UITransform",
@ -2491,15 +2491,15 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 317,
"height": 176
"width": 258.6700134277344,
"height": 239.49000549316406
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.4889589905362776,
"y": 0.3806818181818182
"x": 0.559283993733438,
"y": 0.4989352170154768
},
"_id": "1e6gAhVNVPnosGw5lCW1xw"
"_id": "8aGS7Do0NKSoxe8pO9fysG"
},
{
"__type__": "sp.Skeleton",
@ -2522,12 +2522,12 @@
"a": 255
},
"_skeletonData": {
"__uuid__": "f0411521-9178-487c-84f0-71352fc313fa",
"__uuid__": "5bdf0cb1-f6fd-4f47-8c6a-d86af4205c40",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "正在加载",
"_premultipliedAlpha": false,
"defaultAnimation": "animation",
"_premultipliedAlpha": true,
"_timeScale": 1,
"_preCacheMode": 0,
"_cacheMode": 0,
@ -2538,7 +2538,7 @@
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": "22n4TVKWVOoqH8N3Q1GO/G"
"_id": "d0DxuRF9RIcZZLSgEPncjD"
},
{
"__type__": "cc.UITransform",
@ -2605,7 +2605,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"height": 1599.9999999999998
"height": 1600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -2819,7 +2819,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"height": 1599.9999999999998
"height": 1600
},
"_anchorPoint": {
"__type__": "cc.Vec2",

@ -1,13 +1,21 @@
import { isValid, Node, UIOpacity, UITransform, Vec3 } from 'cc';
import { isValid, Node, sp, UITransform, Vec3 } from 'cc';
import { GBundle } from '../../game/ConfigRes';
import { ConstNumType } from '../../game/GameDataEnums';
import { BattleSpinePlayback } from '../presentation/BattleSpinePlayback';
import { schedulePresentation } from '../skill/BattlePresentationClock';
import type { MapManager } from './legacy/MapManager';
import type { MapGrid } from './legacy/MapGrid';
/** 宝箱预制路径 */
const CHEST_TIP_PATH = 'prefab/';
/** 宝箱预制名(原格子锁) */
/** 宝箱预制名 */
const CHEST_TIP_NAME = '宝箱';
/** 揭示待机 */
const ANIM_IDLE = 'idle';
/** 铲开播放 */
const ANIM_PLAY = 'play';
/** 盖子骨(xiangzi2:跳起落稳后视为已打开) */
const OPEN_LID_BONE = 'z2';
/** tip 世界坐标复用 */
const _tipWorld = new Vec3();
/** tip 本地坐标复用 */
@ -31,17 +39,17 @@ export interface DigChestOutcome {
dugChest: boolean;
/** 本局已铲开宝箱数(含本次) */
dugChestCount: number;
/** 飞入起点世界坐标;未铲到宝箱为 null */
flyWorld: Vec3 | null;
}
/**
* 地图开挖宝箱:开战埋点、八邻揭示宝箱、铲开计数。
* 地图开挖宝箱:开战埋点、八邻揭示(idle)、铲开播 play 后弹三选一。
*/
export class MapDigChestHost {
private _map: MapManager | null = null;
private readonly _slots: DigChestSlot[] = [];
private _dugChestCount = 0;
/** 开箱完成回调世代(clear / 重复开箱作废) */
private _openGen = 0;
/**
* 开战埋宝箱:Const38 为**每个阵营**固定个数,只在各自 CampArea 的 Dig 格内随机位置。
@ -152,36 +160,87 @@ export class MapDigChestHost {
}
/**
* 铲子开挖动画收尾:铲宝箱则计入并返回飞入信息;并补一次八邻揭示。
* 铲子开挖:铲到宝箱则计入;tip 留在格上待播 play(勿提前回收)。
* @param index 被铲格 Index
*/
onDigged(index: number): DigChestOutcome {
const outcome: DigChestOutcome = {
dugChest: false,
dugChestCount: this._dugChestCount,
flyWorld: null,
};
const dugSlot = this._slotOf(index);
if (dugSlot && !dugSlot.dug) {
dugSlot.dug = true;
dugSlot.revealed = true;
this._dugChestCount++;
outcome.dugChest = true;
outcome.dugChestCount = this._dugChestCount;
outcome.flyWorld = this._takeFlyWorld(dugSlot);
this._releaseTip(dugSlot);
const grid = this._map?.getMapGridByIndex(index);
if (grid) {
grid.chestRevealed = false;
grid.updateGrid();
if (!dugSlot.tip?.isValid) {
this._ensureTip(dugSlot, grid);
}
}
}
// 补揭示:防止动画中途回调丢失时邻箱未亮
this._revealNeighbors(index);
return outcome;
}
/**
* 立刻回收 tip(AI 跳过开箱 Spine)。
* @param index 被铲格
*/
releaseTipAt(index: number): void {
const slot = this._slotOf(index);
if (slot) this._releaseTip(slot);
}
/**
* 铲开后播 play:盖子打开落稳后回收 tip 并回调三选一(弹窗后不再继续播开箱)。
* xiangzi2:`z2` translate 约 0.67 起跳、1.2 落稳 → 落稳后弹三选一。
* @param index 被铲格
* @param onOpen 打开之后回调(弹三选一)
*/
playOpen(index: number, onOpen: () => void): void {
const slot = this._slotOf(index);
const tip = slot?.tip ?? null;
if (!slot || !tip?.isValid) {
console.warn('[MapDigChestHost] 开箱缺 tip', index);
onOpen();
return;
}
const sk = this._tipSkeleton(tip);
if (!sk) {
console.warn('[MapDigChestHost] 开箱缺 Spine', index);
this._releaseTip(slot);
onOpen();
return;
}
const gen = ++this._openGen;
const openedAt = BattleSpinePlayback.findBoneMotionEndTime(sk, ANIM_PLAY, OPEN_LID_BONE, 'translate')
?? BattleSpinePlayback.findBoneMotionEndTime(sk, ANIM_PLAY, OPEN_LID_BONE, 'rotate');
if (!(openedAt != null && openedAt > 0)) {
console.warn('[MapDigChestHost] play 无盖开落稳关键帧,立刻弹三选一', index);
}
const openDelay = openedAt != null && openedAt > 0 ? openedAt : 0;
const ok = BattleSpinePlayback.play(sk, ANIM_PLAY, { loop: false });
if (!ok) {
this._releaseTip(slot);
onOpen();
return;
}
schedulePresentation(openDelay, () => {
if (gen !== this._openGen) return;
this._releaseTip(slot);
onOpen();
});
}
/** 退局:归还 tip、清标记 */
clear(): void {
this._openGen++;
for (let i = 0; i < this._slots.length; i++) {
const s = this._slots[i];
this._releaseTip(s);
@ -308,32 +367,23 @@ export class MapDigChestHost {
tip.setPosition(_tipLocal);
}
/** 对象池取出后复位显隐(飞入曾改 scale / opacity) */
/** 对象池取出后复位,并播 idle */
private _resetTipVisual(tip: Node): void {
tip.setScale(1, 1, 1);
const box = tip.getChildByName('box');
if (box?.isValid) box.active = true;
const op = tip.getComponent(UIOpacity);
if (op) op.opacity = 255;
const sk = this._tipSkeleton(tip);
if (!sk) {
console.warn('[MapDigChestHost] 宝箱缺 anim/Spine');
return;
}
BattleSpinePlayback.play(sk, ANIM_IDLE, { loop: true });
}
/**
* 取飞入起点世界坐标。
* @param slot 宝箱槽
* @param tip 宝箱根节点
*/
private _takeFlyWorld(slot: DigChestSlot): Vec3 {
const tip = slot.tip;
if (tip?.isValid) {
tip.getWorldPosition(_tipWorld);
return _tipWorld.clone();
}
const grid = this._map?.getMapGridByIndex(slot.index);
if (grid?.node?.isValid) {
grid.node.getWorldPosition(_tipWorld);
return _tipWorld.clone();
}
console.warn('[MapDigChestHost] 铲宝箱无飞入坐标', slot.index);
return new Vec3();
private _tipSkeleton(tip: Node): sp.Skeleton | null {
const anim = tip.getChildByName('anim');
return anim?.getComponent(sp.Skeleton) ?? tip.getComponentInChildren(sp.Skeleton) ?? null;
}
/**
@ -343,6 +393,8 @@ export class MapDigChestHost {
const tip = slot.tip;
slot.tip = null;
if (!tip || !isValid(tip)) return;
const sk = this._tipSkeleton(tip);
if (sk) BattleSpinePlayback.clearPendingComplete(sk);
tip.active = false;
if (typeof gg !== 'undefined' && tip['resKey'] && gg.res?.putNode) {
gg.res.putNode(tip);

@ -57,6 +57,24 @@ export class BattleSpinePlayback {
* @returns 秒;无则 null
*/
static findFirstAttachmentClearTime(skeleton: sp.Skeleton, animName: string, slotSubstr: string): number | null {
return BattleSpinePlayback._findFirstAttachmentTime(skeleton, animName, slotSubstr, 'clear');
}
/**
* 读 skeletonJson:槽位附件挂上(name!=null)的最早时刻,用于开箱弹出等。
* @param skeleton 骨架
* @param animName 动画名
* @param slotSubstr 槽位名须包含的子串;空串匹配全部
* @returns 秒;无则 null
*/
static findFirstAttachmentAppearTime(skeleton: sp.Skeleton, animName: string, slotSubstr: string): number | null {
return BattleSpinePlayback._findFirstAttachmentTime(skeleton, animName, slotSubstr, 'appear');
}
/**
* @param mode clear=卸附件;appear=挂附件
*/
private static _findFirstAttachmentTime(skeleton: sp.Skeleton, animName: string, slotSubstr: string, mode: 'clear' | 'appear'): number | null {
if (!skeleton?.isValid || !animName) return null;
const sd = skeleton.skeletonData as sp.SkeletonData & { skeletonJson?: unknown; _skeletonJson?: unknown };
if (!sd?.isValid) return null;
@ -76,7 +94,9 @@ export class BattleSpinePlayback {
if (!keys || keys.length === 0) continue;
for (let k = 0; k < keys.length; k++) {
const frame = keys[k];
if (!frame || frame.name != null) continue;
if (!frame) continue;
if (mode === 'clear' && frame.name != null) continue;
if (mode === 'appear' && frame.name == null) continue;
const t = Number(frame.time);
if (!(t > 0)) continue;
if (best == null || t < best) best = t;
@ -131,6 +151,45 @@ export class BattleSpinePlayback {
}
}
/**
* 读 skeletonJson:指定骨骼某轨道第一段连续动作的末帧时刻(打开落稳等)。
* 从首个 time>0 关键帧起,相邻间隔 ≤ gapMaxSec 视为同一段。
* @param skeleton 骨架
* @param animName 动画名
* @param boneName 骨骼全名(精确匹配)
* @param lane rotate / translate / scale
* @param gapMaxSec 段内最大间隔
* @returns 秒;无则 null
*/
static findBoneMotionEndTime(skeleton: sp.Skeleton, animName: string, boneName: string, lane: 'rotate' | 'translate' | 'scale', gapMaxSec = 0.5): number | null {
if (!skeleton?.isValid || !animName || !boneName) return null;
const sd = skeleton.skeletonData as sp.SkeletonData & { skeletonJson?: unknown; _skeletonJson?: unknown };
if (!sd?.isValid) return null;
try {
ensureSpineSkeletonDataRuntime(sd);
type BoneTrack = { rotate?: Array<{ time?: number }>; translate?: Array<{ time?: number }>; scale?: Array<{ time?: number }> };
const raw = (sd.skeletonJson ?? sd._skeletonJson) as { animations?: Record<string, { bones?: Record<string, BoneTrack> }> } | null;
const track = raw?.animations?.[animName]?.bones?.[boneName];
const keys = track?.[lane];
if (!keys || keys.length === 0) return null;
const times: number[] = [];
for (let i = 0; i < keys.length; i++) {
const t = Number(keys[i]?.time);
if (t > 0) times.push(t);
}
if (times.length <= 0) return null;
times.sort((a, b) => a - b);
let end = times[0];
for (let i = 1; i < times.length; i++) {
if (times[i] - end > gapMaxSec) break;
end = times[i];
}
return end;
} catch {
return null;
}
}
/**
* 战斗逻辑时钟下的播完延迟(秒)。
* anim.timeScale 已含战斗倍速时,delay = duration / userTimeScale。

@ -1221,7 +1221,7 @@ export class CocosBagBoardView {
private _skillPeachFlyHandler: ((gridIndex: number, peachCount: number, ownerPlayerId: number) => void) | null = null;
/** 铲子逻辑开挖成功(立刻八邻揭示) */
private _onShovelDigCommitted: ((gridIndex: number) => void) | null = null;
/** 铲子开挖收尾(铲到宝箱飞入 / 三选一) */
/** 铲子开挖收尾(铲到宝箱开箱 / 三选一) */
private _afterShovelDig: ((gridIndex: number) => void) | null = null;
/** 出字起点(btnRefresh)世界坐标 */
@ -1256,7 +1256,7 @@ export class CocosBagBoardView {
}
/**
* 铲子开挖收尾回调(铲到宝箱飞入 / 三选一)。
* 铲子开挖收尾回调(铲到宝箱开箱 / 三选一)。
* @param handler 被铲格 Index;null 清除
*/
setAfterShovelDig(handler: ((gridIndex: number) => void) | null): void {
@ -1510,6 +1510,7 @@ export class CocosBagBoardView {
this.setRecycleGoldFxHandler(null);
this.setBagEntranceHandler(null, null);
this.setSkillPeachFlyHandler(null);
this.setOnShovelDigCommitted(null);
this.setAfterShovelDig(null);
this._unbindMapGridClicks();
this._clearRangeVisual();

@ -1,115 +0,0 @@
import { isValid, Node, Tween, tween, UIOpacity, UITransform, Vec3 } from 'cc';
import { GBundle } from '../../game/ConfigRes';
/** 宝箱预制路径 */
const CHEST_TIP_PATH = 'prefab/';
/** 宝箱预制名 */
const CHEST_TIP_NAME = '宝箱';
/** 飞入时长(秒) */
const FLY_SEC = 0.55;
/** 终点缩放 */
const FLY_END_SCALE = 10;
/** 复用世界坐标 */
const _world = new Vec3();
/** 复用本地坐标 */
const _local = new Vec3();
/** 飞向层本地中心 */
const _endLocal = new Vec3(0, 0, 0);
/**
* 开挖宝箱飞向屏幕中央放大渐隐。
*/
export class BattleDigChestFxPresenter {
private _layer: Node | null = null;
private _flying: Node | null = null;
private _gen = 0;
/**
* @param layer 飞行层(ui_fly)
*/
bind(layer: Node | null): void {
this.clear();
this._layer = layer;
}
/** 停止并回收进行中的飞入 */
clear(): void {
this._gen++;
this._recycleFlying();
this._layer = null;
}
/**
* 宝箱从起点飞向屏中,放大到 10 倍并渐隐,结束后回调。
* @param worldPos 起点世界坐标
* @param onDone 结束回调
*/
playFly(worldPos: Vec3 | null, onDone: () => void): void {
this._recycleFlying();
const layer = this._layer;
if (!layer?.isValid || !worldPos) {
console.warn('[BattleDigChestFx] 飞入层或起点无效,跳过飞入');
onDone();
return;
}
if (typeof gg === 'undefined' || !gg.res?.getNode) {
console.warn('[BattleDigChestFx] gg.res 未就绪,跳过飞入');
onDone();
return;
}
const tip = gg.res.getNode(CHEST_TIP_PATH, CHEST_TIP_NAME, GBundle.BattleGame);
if (!tip?.isValid) {
console.warn('[BattleDigChestFx] 缺少宝箱,跳过飞入');
onDone();
return;
}
const fly = tip;
fly.parent = layer;
fly.setSiblingIndex(layer.children.length - 1);
fly.active = true;
fly.setScale(1, 1, 1);
let opacity = fly.getComponent(UIOpacity);
if (!opacity) opacity = fly.addComponent(UIOpacity);
opacity.opacity = 255;
_world.set(worldPos.x, worldPos.y, worldPos.z);
const ut = layer.getComponent(UITransform);
if (ut) {
ut.convertToNodeSpaceAR(_world, _local);
fly.setPosition(_local);
} else {
fly.setWorldPosition(_world);
}
this._flying = fly;
const gen = ++this._gen;
// ui_fly 居中锚点时本地 (0,0) 即屏中
const endPos = _endLocal.clone();
Tween.stopAllByTarget(fly);
tween(fly)
.to(FLY_SEC, { position: endPos, scale: new Vec3(FLY_END_SCALE, FLY_END_SCALE, 1) }, { easing: 'sineOut' })
.start();
tween(opacity)
.to(FLY_SEC, { opacity: 0 }, { easing: 'sineIn' })
.call(() => {
if (gen !== this._gen) return;
this._recycleFlying();
onDone();
})
.start();
}
private _recycleFlying(): void {
const fly = this._flying;
this._flying = null;
if (!fly || !isValid(fly)) return;
Tween.stopAllByTarget(fly);
const op = fly.getComponent(UIOpacity);
if (op) Tween.stopAllByTarget(op);
fly.setScale(1, 1, 1);
if (op) op.opacity = 255;
if (fly['resKey'] && typeof gg !== 'undefined' && gg.res?.putNode) {
gg.res.putNode(fly);
} else {
fly.destroy();
}
}
}

@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4ac2d221-78d6-4f04-923e-9eb7058d9e19",
"files": [],
"subMetas": {},
"userData": {}
}

@ -43,7 +43,6 @@ import { BattleGameItemAdPresenter } from './BattleGameItemAdPresenter';
import { BattleGameMenShenTrapController } from './BattleGameMenShenTrapController';
import { getBattleGameMonsterCrisisHintPresenter } from './BattleGameMonsterCrisisHintPresenter';
import { BattleGameKillPeachPresenter } from './BattleGameKillPeachPresenter';
import { BattleDigChestFxPresenter } from './BattleDigChestFxPresenter';
import { MapDigChestHost } from '../../battle/map/MapDigChestHost';
import { getBattleBuffBaseThunderHost } from '../../battle/combat/BattleBuffBaseThunderHost';
import { BattleBuffSelectService } from '../../manager/battleBuff/BattleBuffSelectService';
@ -118,10 +117,8 @@ export class UIBattleGame extends Auto_BattleGame {
private _menShenTrap: BattleGameMenShenTrapController | null = null;
/** btnItem 门神盾牌广告 */
private _itemAd: BattleGameItemAdPresenter | null = null;
/** 开挖宝箱埋点 / 揭示 */
/** 开挖宝箱埋点 / 揭示 / 开箱 Spine */
private _digChestHost: MapDigChestHost | null = null;
/** 开挖宝箱飞入屏中 */
private _digChestFx: BattleDigChestFxPresenter | null = null;
/** 御雷珠被动落雷表现 */
private _baseThunderFx: BattleGameBaseThunderPresenter | null = null;
/** 敌方 Boss 出场弹窗 */
@ -1034,29 +1031,45 @@ export class UIBattleGame extends Auto_BattleGame {
*/
private _bindDigChest(map: MapManager): void {
this._digChestHost?.clear();
this._digChestFx?.clear();
this._digChestHost = new MapDigChestHost();
this._digChestHost.init(map);
this._digChestFx = new BattleDigChestFxPresenter();
this._digChestFx.bind(this.ui_fly ?? this.ui_mapParentNode);
this._bagView?.setOnShovelDigCommitted(this._onPlayerShovelDigCommitted);
this._bagView?.setAfterShovelDig(this._onAfterPlayerShovelDig);
AiBattleBridge.inst.setOnShovelDigCommitted(this._onAiShovelDigCommitted);
AiBattleBridge.inst.setAfterShovelDig(this._onAfterAiShovelDig);
}
/** 玩家铲逻辑成功:立刻八邻揭示宝箱 */
/**
* 玩家铲逻辑成功:立刻八邻揭示;若本格是宝箱则播 play(不等铲 Spine 收尾)。
*/
private readonly _onPlayerShovelDigCommitted = (gridIndex: number): void => {
this._digChestHost?.revealAround(gridIndex);
this._tryOpenPlayerDigChest(gridIndex);
};
/** AI 铲逻辑成功:立刻八邻揭示宝箱 */
/** AI 铲逻辑成功:立刻八邻揭示;铲到宝箱则直接 autoPick */
private readonly _onAiShovelDigCommitted = (gridIndex: number): void => {
this._digChestHost?.revealAround(gridIndex);
this._tryOpenAiDigChest(gridIndex);
};
/** 玩家铲收尾:铲到宝箱则飞入后弹三选一 */
/**
* 玩家铲动画收尾:补一次开箱(提交时已开则 onDigged 为 false,无重复)。
*/
private readonly _onAfterPlayerShovelDig = (gridIndex: number): void => {
this._tryOpenPlayerDigChest(gridIndex);
};
/** AI 铲动画收尾:补一次开箱(提交时已开则跳过) */
private readonly _onAfterAiShovelDig = (gridIndex: number): void => {
this._tryOpenAiDigChest(gridIndex);
};
/**
* 本机铲到宝箱:计入后播 play,播完弹三选一。
* @param gridIndex 被铲格
*/
private _tryOpenPlayerDigChest(gridIndex: number): void {
const host = this._digChestHost;
const battle = this._battle;
if (!host || !battle) return;
@ -1064,20 +1077,24 @@ export class UIBattleGame extends Auto_BattleGame {
if (!outcome.dugChest) return;
const playerId = battle.localPlayerId ?? 0;
const count = outcome.dugChestCount;
this._digChestFx?.playFly(outcome.flyWorld, () => {
host.playOpen(gridIndex, () => {
battle.bagSession?.onBattleBuffSelect?.(playerId, count);
});
};
}
/** AI 铲收尾:铲到宝箱则直接 autoPick */
private readonly _onAfterAiShovelDig = (gridIndex: number): void => {
/**
* AI 铲到宝箱:计入后立刻收 tip 并 autoPick(跳过开箱 Spine)。
* @param gridIndex 被铲格
*/
private _tryOpenAiDigChest(gridIndex: number): void {
const host = this._digChestHost;
if (!host) return;
const outcome = host.onDigged(gridIndex);
if (!outcome.dugChest) return;
host.releaseTipAt(gridIndex);
const aiBag = AiBattleBridge.inst.aiBagSession;
aiBag?.onBattleBuffSelect?.(AiHeadlessBagHost.AI_PLAYER_ID, outcome.dugChestCount);
};
}
/** 本局获得 buff 后刷新技能栏与基地血条 */
refreshBattleBuffSkills(): void {
@ -1508,10 +1525,10 @@ export class UIBattleGame extends Auto_BattleGame {
getBattleGameMonsterCrisisHintPresenter().unbind();
this._itemAd?.unbind();
this._itemAd = null;
this._bagView?.setOnShovelDigCommitted(null);
this._bagView?.setAfterShovelDig(null);
AiBattleBridge.inst.setOnShovelDigCommitted(null);
AiBattleBridge.inst.setAfterShovelDig(null);
this._digChestFx?.clear();
this._digChestFx = null;
this._digChestHost?.clear();
this._digChestHost = null;
this._baseThunderFx?.unbind();

@ -8,9 +8,9 @@
| 项 | 说明 |
|----|------|
| 触发 | 铲子铲开地图宝箱格(开战随机埋 6 个,见 `docs/需求-开挖宝箱.md`) |
| 钩子 | 开挖收尾 → `MapDigChestHost.onDigged` → `onBattleBuffSelect(owner, dugChestCount)`;**每次**宝箱都触发 |
| 玩家 | 宝箱飞屏中心×10 渐隐后 `UIID.PopSelect`(`pauseBattle` + 面板弹出) |
| AI | `BattleBuffSelectService.autoPickOne`(无飞入、无 UI) |
| 钩子 | 开挖提交 → `MapDigChestHost.onDigged` → tip 播 `play` → 盖开落稳后 `onBattleBuffSelect`;**每次**宝箱都触发 |
| 玩家 | tip `play` 盖开落稳(`z2`≈1.2s)后 `UIID.PopSelect`(`pauseBattle` + 面板弹出) |
| AI | `BattleBuffSelectService.autoPickOne`(跳过开箱 Spine、无 UI) |
| 携带 | `BattleBuffCarryStore`(开战 clear,不写跨天存档) |
| Const27 | **废弃**(原按解锁区域次数门闸,不再读取) |
| 格子锁 | 八邻揭示宝箱时挂 `格子锁`,只显 `box`;`lock`/`five`/`num` 隐藏 |
@ -41,7 +41,7 @@
## 5. 验收
- [ ] 铲开宝箱弹出三选一(最多 6 次);八邻揭示格子锁正确
- [ ] 铲开宝箱播 play 后弹出三选一(最多 Const38×阵营);八邻揭示 tip idle 正确
- [ ] 免费/广告刷新次数与品质权重符合 Const 30~37
- [ ] 选中后被动栏刷新;101~104 对匹配五行等级塔生效

@ -8,9 +8,9 @@
1. 可开挖格默认无底皮(露深色地图底)。
2. 开战按阵营从各自纯 Dig 格埋宝箱(个数读 Const38,**每阵营固定个数**,只随机位置;仅逻辑,无表现)。
3. 铲子开挖后,若八邻有未揭示宝箱 → 显示「格子锁」+ `waitUnlockedSprite`(待解锁地块)。
4. 铲开宝箱格 → 宝箱飞向屏中放大×10 渐隐 → 弹出三选一(每次都弹;不用 Const27)。
5. AI 铲开宝箱:跳过飞入,直接 `autoPickOne`。
3. 铲子开挖后,若八邻有未揭示宝箱 → 显示宝箱 tip(Spine `idle`)+ `waitUnlockedSprite`(待解锁地块)。
4. 铲开宝箱格 → tip 播 Spine `play`,盖子打开落稳后(`z2` translate 约 1.2s)回收 tip 并弹出三选一(每次都弹;不用 Const27;**无放大飞入**)。
5. AI 铲开宝箱:跳过开箱 Spine,直接 `autoPickOne`。
## 规则
@ -20,13 +20,14 @@
| 数量 | Const38 `para`(每阵营固定);本阵营 Dig 不足则全埋并 `warn` |
| 邻域 | 八邻(含对角) |
| 默认 Dig 皮 | `spriteFrame = null` |
| 已揭示宝箱 Dig 皮 | `waitUnlockedSprite` + 预制体 `宝箱`(挂在格子节点上) |
| 已揭示宝箱 Dig 皮 | `waitUnlockedSprite` + 预制体 `宝箱`(`anim` 播 `idle`) |
| 铲开表现 | 同 tip 播 `play` → 盖开落稳后回收 tip + PopSelect |
| 三选一 | 每铲开 1 个宝箱触发 1 次;Const27 废弃 |
## 验收
- [ ] 开战 Dig 无皮;日志确认**每阵营**埋 Const38 个
- [ ] 铲邻格八邻:出宝箱 tip + 待解锁皮
- [ ] 铲宝箱:飞中央×10 渐隐 → PopSelect;每阵营最多 Const38 次
- [ ] AI 铲宝箱自动选 buff,无面板
- [ ] 铲邻格八邻:出宝箱 tip(idle)+ 待解锁皮
- [ ] 铲宝箱:play 盖开落稳后弹 PopSelect(不必等播完);每阵营最多 Const38 次
- [ ] AI 铲宝箱自动选 buff,无面板、无开箱等待
- [ ] Const27 不再门闸弹窗

@ -2125,49 +2125,6 @@ html.pw-inspect #GameCanvas {
white-space: nowrap;
}
/* 开关:滑动钮(还原) */
.pw-insp-check {
display: inline-flex;
width: 36px;
height: 20px;
border-radius: 10px;
background: #484848;
border: 1px solid var(--pw-border);
position: relative;
cursor: pointer;
vertical-align: middle;
padding: 0;
flex-shrink: 0;
}
.pw-insp-check input {
opacity: 0;
width: 0;
height: 0;
position: absolute;
margin: 0;
}
.pw-insp-check span {
width: 16px;
height: 16px;
border-radius: 50%;
background: #d0d0d0;
margin: 1px;
transition: transform 0.15s ease, background 0.15s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.pw-insp-check.on {
background: var(--pw-accent);
border-color: var(--pw-accent);
}
.pw-insp-check.on span {
transform: translateX(16px);
background: #fff;
}
/* Widget:对齐示意 + 分段选择(对齐官方) */
.pw-widget-vis {
display: flex;
@ -2433,10 +2390,11 @@ html.pw-inspect #GameCanvas {
.pw-insp-check {
position: relative;
width: 28px;
height: 16px;
margin-top: 3px;
width: 36px;
height: 20px;
margin-top: 0;
cursor: pointer;
flex-shrink: 0;
}
.pw-insp-check input {
@ -2452,7 +2410,7 @@ html.pw-inspect #GameCanvas {
border-radius: 999px;
background: #3c3c3c;
border: 1px solid #555;
transition: background 0.12s ease;
transition: background 0.12s ease, border-color 0.12s ease;
}
.pw-insp-check span::after {
@ -2460,20 +2418,23 @@ html.pw-inspect #GameCanvas {
position: absolute;
top: 1px;
left: 1px;
width: 12px;
height: 12px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #ccc;
transition: transform 0.12s ease;
transition: transform 0.12s ease, background 0.12s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.pw-insp-check input:checked + span {
.pw-insp-check input:checked + span,
.pw-insp-check.on span {
background: var(--pw-accent);
border-color: var(--pw-accent);
}
.pw-insp-check input:checked + span::after {
transform: translateX(12px);
.pw-insp-check input:checked + span::after,
.pw-insp-check.on span::after {
transform: translateX(16px);
background: #fff;
}

Loading…
Cancel
Save