箱子整体流程完成,遗留测试解锁区块
This commit is contained in:
parent
af51781cac
commit
b689982fc9
8
box1/Assets/Art/Spine/BoxItem.meta
Normal file
8
box1/Assets/Art/Spine/BoxItem.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f8f9a0391e1bae4baf538616d8b2794
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
818
box1/Assets/Art/Spine/BoxItem/bb_sc_1.atlas.txt
Normal file
818
box1/Assets/Art/Spine/BoxItem/bb_sc_1.atlas.txt
Normal file
@ -0,0 +1,818 @@
|
||||
|
||||
bb_sc_1.png
|
||||
size: 2001,1598
|
||||
format: RGBA8888
|
||||
filter: Linear,Linear
|
||||
repeat: none
|
||||
cfj1
|
||||
rotate: true
|
||||
xy: 891, 930
|
||||
size: 170, 141
|
||||
orig: 170, 141
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
cfj2
|
||||
rotate: false
|
||||
xy: 1764, 910
|
||||
size: 143, 152
|
||||
orig: 145, 153
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
cfj3
|
||||
rotate: false
|
||||
xy: 1034, 957
|
||||
size: 137, 152
|
||||
orig: 137, 152
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
cfj4
|
||||
rotate: true
|
||||
xy: 1764, 795
|
||||
size: 113, 162
|
||||
orig: 118, 164
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
dsz1
|
||||
rotate: true
|
||||
xy: 543, 1101
|
||||
size: 253, 128
|
||||
orig: 253, 128
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dsz2
|
||||
rotate: true
|
||||
xy: 172, 889
|
||||
size: 274, 142
|
||||
orig: 275, 142
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dsz3
|
||||
rotate: false
|
||||
xy: 684, 1415
|
||||
size: 292, 181
|
||||
orig: 292, 182
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dsz4
|
||||
rotate: false
|
||||
xy: 1266, 1423
|
||||
size: 281, 173
|
||||
orig: 281, 173
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dyg1
|
||||
rotate: true
|
||||
xy: 214, 628
|
||||
size: 259, 138
|
||||
orig: 259, 139
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
dyg2
|
||||
rotate: true
|
||||
xy: 2, 541
|
||||
size: 309, 163
|
||||
orig: 309, 163
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dyg3
|
||||
rotate: false
|
||||
xy: 1549, 1439
|
||||
size: 270, 157
|
||||
orig: 270, 157
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
dyg4
|
||||
rotate: false
|
||||
xy: 978, 1427
|
||||
size: 286, 169
|
||||
orig: 287, 170
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
eh1
|
||||
rotate: true
|
||||
xy: 354, 550
|
||||
size: 174, 221
|
||||
orig: 174, 221
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
eh2
|
||||
rotate: false
|
||||
xy: 2, 20
|
||||
size: 192, 233
|
||||
orig: 192, 233
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
eh3
|
||||
rotate: true
|
||||
xy: 313, 1171
|
||||
size: 183, 228
|
||||
orig: 183, 228
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
eh4
|
||||
rotate: false
|
||||
xy: 354, 726
|
||||
size: 197, 227
|
||||
orig: 197, 227
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
fj1
|
||||
rotate: false
|
||||
xy: 1176, 1106
|
||||
size: 113, 230
|
||||
orig: 114, 230
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
fj2
|
||||
rotate: false
|
||||
xy: 577, 529
|
||||
size: 111, 195
|
||||
orig: 112, 195
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
fj3
|
||||
rotate: false
|
||||
xy: 1063, 741
|
||||
size: 128, 214
|
||||
orig: 128, 214
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
fj4
|
||||
rotate: false
|
||||
xy: 1124, 270
|
||||
size: 137, 248
|
||||
orig: 137, 249
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
gef
|
||||
rotate: false
|
||||
xy: 999, 297
|
||||
size: 123, 221
|
||||
orig: 124, 221
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
gef2
|
||||
rotate: false
|
||||
xy: 553, 726
|
||||
size: 126, 227
|
||||
orig: 126, 228
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
gef3
|
||||
rotate: false
|
||||
xy: 577, 306
|
||||
size: 111, 221
|
||||
orig: 112, 221
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
gef4
|
||||
rotate: false
|
||||
xy: 577, 85
|
||||
size: 111, 219
|
||||
orig: 111, 219
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ggx1
|
||||
rotate: false
|
||||
xy: 1821, 1430
|
||||
size: 177, 166
|
||||
orig: 177, 166
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ggx2
|
||||
rotate: false
|
||||
xy: 278, 348
|
||||
size: 201, 200
|
||||
orig: 209, 209
|
||||
offset: 6, 5
|
||||
index: -1
|
||||
ggx3
|
||||
rotate: false
|
||||
xy: 704, 942
|
||||
size: 185, 202
|
||||
orig: 185, 202
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ggx4
|
||||
rotate: true
|
||||
xy: 1813, 1064
|
||||
size: 220, 179
|
||||
orig: 220, 179
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hdj1
|
||||
rotate: false
|
||||
xy: 1267, 48
|
||||
size: 130, 226
|
||||
orig: 130, 226
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hdj2
|
||||
rotate: false
|
||||
xy: 673, 1146
|
||||
size: 216, 214
|
||||
orig: 216, 215
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hdj3
|
||||
rotate: false
|
||||
xy: 690, 296
|
||||
size: 188, 213
|
||||
orig: 190, 213
|
||||
offset: 2, 0
|
||||
index: -1
|
||||
hdj4
|
||||
rotate: false
|
||||
xy: 1193, 521
|
||||
size: 158, 185
|
||||
orig: 160, 185
|
||||
offset: 2, 0
|
||||
index: -1
|
||||
hz1
|
||||
rotate: false
|
||||
xy: 1525, 1024
|
||||
size: 187, 135
|
||||
orig: 187, 137
|
||||
offset: 0, 2
|
||||
index: -1
|
||||
hz2
|
||||
rotate: false
|
||||
xy: 871, 101
|
||||
size: 165, 193
|
||||
orig: 165, 193
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hz3
|
||||
rotate: false
|
||||
xy: 690, 101
|
||||
size: 179, 193
|
||||
orig: 179, 193
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hz4
|
||||
rotate: false
|
||||
xy: 882, 528
|
||||
size: 161, 211
|
||||
orig: 161, 213
|
||||
offset: 0, 2
|
||||
index: -1
|
||||
hzs1
|
||||
rotate: true
|
||||
xy: 1549, 1350
|
||||
size: 87, 262
|
||||
orig: 87, 262
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hzs2
|
||||
rotate: true
|
||||
xy: 278, 11
|
||||
size: 103, 240
|
||||
orig: 103, 240
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
hzs3
|
||||
rotate: false
|
||||
xy: 1331, 713
|
||||
size: 74, 242
|
||||
orig: 74, 243
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
hzs4
|
||||
rotate: false
|
||||
xy: 196, 24
|
||||
size: 80, 256
|
||||
orig: 81, 256
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/bao-a
|
||||
rotate: false
|
||||
xy: 978, 6
|
||||
size: 136, 92
|
||||
orig: 137, 92
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
new/bao-b
|
||||
rotate: false
|
||||
xy: 1800, 298
|
||||
size: 153, 111
|
||||
orig: 153, 111
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/bao-c
|
||||
rotate: true
|
||||
xy: 880, 296
|
||||
size: 213, 117
|
||||
orig: 213, 117
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/bao-d
|
||||
rotate: true
|
||||
xy: 1698, 418
|
||||
size: 173, 109
|
||||
orig: 173, 109
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/fh-a
|
||||
rotate: false
|
||||
xy: 1549, 298
|
||||
size: 61, 81
|
||||
orig: 64, 82
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
new/fh-b
|
||||
rotate: false
|
||||
xy: 1941, 515
|
||||
size: 58, 80
|
||||
orig: 64, 80
|
||||
offset: 6, 0
|
||||
index: -1
|
||||
new/fh-c
|
||||
rotate: true
|
||||
xy: 214, 556
|
||||
size: 70, 89
|
||||
orig: 72, 91
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/fh-d
|
||||
rotate: false
|
||||
xy: 1920, 218
|
||||
size: 65, 78
|
||||
orig: 68, 80
|
||||
offset: 3, 2
|
||||
index: -1
|
||||
new/kh-a
|
||||
rotate: true
|
||||
xy: 1813, 593
|
||||
size: 44, 89
|
||||
orig: 46, 90
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
new/kh-b
|
||||
rotate: false
|
||||
xy: 1941, 422
|
||||
size: 42, 91
|
||||
orig: 42, 91
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/kh-c
|
||||
rotate: true
|
||||
xy: 444, 117
|
||||
size: 33, 103
|
||||
orig: 33, 103
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/kh-d
|
||||
rotate: false
|
||||
xy: 930, 2
|
||||
size: 46, 97
|
||||
orig: 46, 97
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/qin-a
|
||||
rotate: true
|
||||
xy: 891, 1102
|
||||
size: 258, 88
|
||||
orig: 258, 88
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/qin-b
|
||||
rotate: true
|
||||
xy: 1714, 1086
|
||||
size: 262, 97
|
||||
orig: 271, 100
|
||||
offset: 4, 1
|
||||
index: -1
|
||||
new/qin-c
|
||||
rotate: false
|
||||
xy: 981, 1338
|
||||
size: 266, 87
|
||||
orig: 266, 87
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/qin-d
|
||||
rotate: false
|
||||
xy: 690, 2
|
||||
size: 238, 97
|
||||
orig: 238, 97
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xf-a
|
||||
rotate: true
|
||||
xy: 1119, 13
|
||||
size: 87, 141
|
||||
orig: 87, 142
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xf-b
|
||||
rotate: false
|
||||
xy: 1567, 127
|
||||
size: 64, 169
|
||||
orig: 71, 176
|
||||
offset: 2, 7
|
||||
index: -1
|
||||
new/xf-c
|
||||
rotate: false
|
||||
xy: 1549, 381
|
||||
size: 76, 210
|
||||
orig: 76, 210
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xf-d
|
||||
rotate: false
|
||||
xy: 1809, 411
|
||||
size: 64, 180
|
||||
orig: 70, 188
|
||||
offset: 1, 8
|
||||
index: -1
|
||||
new/xj-a
|
||||
rotate: false
|
||||
xy: 1788, 113
|
||||
size: 129, 88
|
||||
orig: 129, 88
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xj-b
|
||||
rotate: false
|
||||
xy: 1788, 203
|
||||
size: 130, 93
|
||||
orig: 130, 93
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xj-c
|
||||
rotate: true
|
||||
xy: 1425, 521
|
||||
size: 193, 99
|
||||
orig: 195, 99
|
||||
offset: 2, 0
|
||||
index: -1
|
||||
new/xj-d
|
||||
rotate: true
|
||||
xy: 1813, 639
|
||||
size: 154, 113
|
||||
orig: 154, 114
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xmn-a
|
||||
rotate: false
|
||||
xy: 1627, 387
|
||||
size: 69, 204
|
||||
orig: 69, 204
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xmn-b
|
||||
rotate: true
|
||||
xy: 1399, 2
|
||||
size: 74, 187
|
||||
orig: 74, 187
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xmn-c
|
||||
rotate: false
|
||||
xy: 1353, 522
|
||||
size: 70, 189
|
||||
orig: 70, 189
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/xmn-d
|
||||
rotate: false
|
||||
xy: 1038, 100
|
||||
size: 79, 195
|
||||
orig: 79, 195
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/ys-a
|
||||
rotate: true
|
||||
xy: 362, 1356
|
||||
size: 48, 300
|
||||
orig: 48, 301
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/ys-b
|
||||
rotate: false
|
||||
xy: 167, 552
|
||||
size: 45, 298
|
||||
orig: 45, 298
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/ys-c
|
||||
rotate: true
|
||||
xy: 684, 1362
|
||||
size: 51, 295
|
||||
orig: 51, 295
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
new/ys-d
|
||||
rotate: true
|
||||
xy: 1249, 1356
|
||||
size: 65, 291
|
||||
orig: 70, 295
|
||||
offset: 2, 0
|
||||
index: -1
|
||||
sb1
|
||||
rotate: true
|
||||
xy: 1870, 22
|
||||
size: 89, 86
|
||||
orig: 89, 86
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
sb2
|
||||
rotate: true
|
||||
xy: 1755, 19
|
||||
size: 92, 113
|
||||
orig: 93, 114
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
sb3
|
||||
rotate: false
|
||||
xy: 1698, 298
|
||||
size: 100, 118
|
||||
orig: 101, 119
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
sb4
|
||||
rotate: true
|
||||
xy: 1633, 59
|
||||
size: 100, 120
|
||||
orig: 101, 120
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
sl1
|
||||
rotate: true
|
||||
xy: 1399, 78
|
||||
size: 196, 100
|
||||
orig: 196, 100
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
sl2
|
||||
rotate: true
|
||||
xy: 1632, 593
|
||||
size: 189, 89
|
||||
orig: 189, 90
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
sl3
|
||||
rotate: true
|
||||
xy: 481, 346
|
||||
size: 202, 94
|
||||
orig: 202, 95
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
sl4
|
||||
rotate: true
|
||||
xy: 1723, 593
|
||||
size: 200, 88
|
||||
orig: 200, 88
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
st1
|
||||
rotate: false
|
||||
xy: 681, 734
|
||||
size: 198, 206
|
||||
orig: 200, 206
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
st2
|
||||
rotate: false
|
||||
xy: 316, 955
|
||||
size: 220, 214
|
||||
orig: 220, 214
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
st3
|
||||
rotate: false
|
||||
xy: 1291, 1136
|
||||
size: 196, 218
|
||||
orig: 222, 218
|
||||
offset: 26, 0
|
||||
index: -1
|
||||
st4
|
||||
rotate: false
|
||||
xy: 981, 1111
|
||||
size: 193, 225
|
||||
orig: 193, 225
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
wj1
|
||||
rotate: true
|
||||
xy: 538, 955
|
||||
size: 144, 164
|
||||
orig: 146, 166
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
wj2
|
||||
rotate: true
|
||||
xy: 1173, 957
|
||||
size: 147, 166
|
||||
orig: 156, 168
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
wj3
|
||||
rotate: false
|
||||
xy: 1119, 102
|
||||
size: 146, 166
|
||||
orig: 148, 168
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
wj4
|
||||
rotate: true
|
||||
xy: 1391, 355
|
||||
size: 164, 156
|
||||
orig: 166, 158
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
xl1
|
||||
rotate: false
|
||||
xy: 1633, 161
|
||||
size: 153, 135
|
||||
orig: 154, 135
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
xl2
|
||||
rotate: false
|
||||
xy: 1813, 1286
|
||||
size: 186, 142
|
||||
orig: 186, 148
|
||||
offset: 0, 4
|
||||
index: -1
|
||||
xl3
|
||||
rotate: true
|
||||
xy: 278, 116
|
||||
size: 230, 164
|
||||
orig: 231, 169
|
||||
offset: 1, 5
|
||||
index: -1
|
||||
xl4
|
||||
rotate: true
|
||||
xy: 2, 255
|
||||
size: 284, 154
|
||||
orig: 284, 154
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
xs1
|
||||
rotate: false
|
||||
xy: 1928, 597
|
||||
size: 68, 148
|
||||
orig: 75, 154
|
||||
offset: 7, 6
|
||||
index: -1
|
||||
xs2
|
||||
rotate: false
|
||||
xy: 1909, 910
|
||||
size: 90, 152
|
||||
orig: 92, 152
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
xs3
|
||||
rotate: false
|
||||
xy: 1501, 78
|
||||
size: 64, 196
|
||||
orig: 69, 197
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
xs4
|
||||
rotate: false
|
||||
xy: 1526, 593
|
||||
size: 104, 189
|
||||
orig: 104, 191
|
||||
offset: 0, 2
|
||||
index: -1
|
||||
xz1
|
||||
rotate: true
|
||||
xy: 881, 741
|
||||
size: 187, 180
|
||||
orig: 187, 180
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
xz2
|
||||
rotate: true
|
||||
xy: 1341, 959
|
||||
size: 175, 145
|
||||
orig: 175, 145
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
xz3
|
||||
rotate: false
|
||||
xy: 1489, 1161
|
||||
size: 223, 187
|
||||
orig: 223, 187
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
xz4
|
||||
rotate: true
|
||||
xy: 690, 511
|
||||
size: 221, 190
|
||||
orig: 221, 190
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yj1
|
||||
rotate: true
|
||||
xy: 1875, 414
|
||||
size: 177, 64
|
||||
orig: 177, 64
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yj2
|
||||
rotate: false
|
||||
xy: 1391, 276
|
||||
size: 155, 77
|
||||
orig: 156, 81
|
||||
offset: 1, 0
|
||||
index: -1
|
||||
yj3
|
||||
rotate: true
|
||||
xy: 1928, 747
|
||||
size: 161, 71
|
||||
orig: 161, 71
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yj4
|
||||
rotate: false
|
||||
xy: 520, 11
|
||||
size: 158, 72
|
||||
orig: 158, 73
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
yjia1
|
||||
rotate: true
|
||||
xy: 1193, 708
|
||||
size: 247, 136
|
||||
orig: 249, 138
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
yjia2
|
||||
rotate: true
|
||||
xy: 1263, 276
|
||||
size: 243, 126
|
||||
orig: 245, 128
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
yjia3
|
||||
rotate: true
|
||||
xy: 1045, 520
|
||||
size: 219, 146
|
||||
orig: 221, 148
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
yjia4
|
||||
rotate: true
|
||||
xy: 158, 282
|
||||
size: 257, 118
|
||||
orig: 259, 120
|
||||
offset: 1, 1
|
||||
index: -1
|
||||
yq1
|
||||
rotate: true
|
||||
xy: 2, 852
|
||||
size: 311, 168
|
||||
orig: 311, 168
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yq2
|
||||
rotate: false
|
||||
xy: 362, 1406
|
||||
size: 320, 190
|
||||
orig: 320, 190
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yq3
|
||||
rotate: false
|
||||
xy: 2, 1381
|
||||
size: 358, 215
|
||||
orig: 358, 215
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
yq4
|
||||
rotate: false
|
||||
xy: 2, 1165
|
||||
size: 309, 214
|
||||
orig: 309, 214
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ys1
|
||||
rotate: false
|
||||
xy: 444, 152
|
||||
size: 131, 192
|
||||
orig: 133, 192
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ys2
|
||||
rotate: false
|
||||
xy: 1648, 795
|
||||
size: 114, 227
|
||||
orig: 114, 228
|
||||
offset: 0, 1
|
||||
index: -1
|
||||
ys3
|
||||
rotate: false
|
||||
xy: 1525, 784
|
||||
size: 121, 238
|
||||
orig: 121, 238
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
ys4
|
||||
rotate: false
|
||||
xy: 1407, 716
|
||||
size: 116, 241
|
||||
orig: 119, 245
|
||||
offset: 2, 0
|
||||
index: -1
|
7
box1/Assets/Art/Spine/BoxItem/bb_sc_1.atlas.txt.meta
Normal file
7
box1/Assets/Art/Spine/BoxItem/bb_sc_1.atlas.txt.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d501ad8704814a2458c9f33cb99c0cec
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1252
box1/Assets/Art/Spine/BoxItem/bb_sc_1.json
Normal file
1252
box1/Assets/Art/Spine/BoxItem/bb_sc_1.json
Normal file
File diff suppressed because it is too large
Load Diff
7
box1/Assets/Art/Spine/BoxItem/bb_sc_1.json.meta
Normal file
7
box1/Assets/Art/Spine/BoxItem/bb_sc_1.json.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afb9c69657dd64c409a881efafaa28f3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
box1/Assets/Art/Spine/BoxItem/bb_sc_1.png
Normal file
BIN
box1/Assets/Art/Spine/BoxItem/bb_sc_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 602 KiB |
140
box1/Assets/Art/Spine/BoxItem/bb_sc_1.png.meta
Normal file
140
box1/Assets/Art/Spine/BoxItem/bb_sc_1.png.meta
Normal file
@ -0,0 +1,140 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4a91230b3a97f246920e788da8b3a33
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Atlas.asset
Normal file
17
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Atlas.asset
Normal file
@ -0,0 +1,17 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
|
||||
m_Name: bb_sc_1_Atlas
|
||||
m_EditorClassIdentifier:
|
||||
atlasFile: {fileID: 4900000, guid: d501ad8704814a2458c9f33cb99c0cec, type: 3}
|
||||
materials:
|
||||
- {fileID: 2100000, guid: b528e11b57d69f246a4540967e795bb1, type: 2}
|
8
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Atlas.asset.meta
Normal file
8
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Atlas.asset.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d70e6fed8a01f144961496127d8e248
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
45
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Material.mat
Normal file
45
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Material.mat
Normal file
@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: bb_sc_1_Material
|
||||
m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _USE8NEIGHBOURHOOD_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: e4a91230b3a97f246920e788da8b3a33, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Cutoff: 0.1
|
||||
- _OutlineMipLevel: 0
|
||||
- _OutlineReferenceTexWidth: 1024
|
||||
- _OutlineSmoothness: 1
|
||||
- _OutlineWidth: 3
|
||||
- _StencilComp: 8
|
||||
- _StencilRef: 1
|
||||
- _StraightAlphaInput: 0
|
||||
- _ThresholdEnd: 0.25
|
||||
- _Use8Neighbourhood: 1
|
||||
m_Colors:
|
||||
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
8
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Material.mat.meta
Normal file
8
box1/Assets/Art/Spine/BoxItem/bb_sc_1_Material.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b528e11b57d69f246a4540967e795bb1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
box1/Assets/Art/Spine/BoxItem/bb_sc_1_SkeletonData.asset
Normal file
24
box1/Assets/Art/Spine/BoxItem/bb_sc_1_SkeletonData.asset
Normal file
@ -0,0 +1,24 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
|
||||
m_Name: bb_sc_1_SkeletonData
|
||||
m_EditorClassIdentifier:
|
||||
atlasAssets:
|
||||
- {fileID: 11400000, guid: 8d70e6fed8a01f144961496127d8e248, type: 2}
|
||||
scale: 0.01
|
||||
skeletonJSON: {fileID: 4900000, guid: afb9c69657dd64c409a881efafaa28f3, type: 3}
|
||||
skeletonDataModifiers: []
|
||||
fromAnimation: []
|
||||
toAnimation: []
|
||||
duration: []
|
||||
defaultMix: 0.2
|
||||
controller: {fileID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02f1e52b13367e242b0d26a3ff2de142
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -217,4 +217,5 @@ MonoBehaviour:
|
||||
gX: 0
|
||||
gY: 0
|
||||
spine: {fileID: 2696603159212677698}
|
||||
gridLock: 0
|
||||
item: {fileID: 0}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,37 @@ public class GameManager : MonoBehaviour
|
||||
public List<ItemData> itemDatas;
|
||||
public List<ItemData> itemDatas1;
|
||||
public List<ItemData> itemDatas2;
|
||||
public ItemObj seletObj;
|
||||
|
||||
public ItemObj seletObj
|
||||
{
|
||||
get { return seletItem; }
|
||||
set
|
||||
{
|
||||
seletItem = value;
|
||||
if (seletUnlock!=null)
|
||||
{
|
||||
seletUnlock.transform.position = MapManager.ins.lockParent.position;
|
||||
seletUnlock = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ItemObj seletItem;
|
||||
|
||||
public UnLockGrid seletUnlock
|
||||
{
|
||||
get { return seletLockObj; }
|
||||
set
|
||||
{
|
||||
seletLockObj = value;
|
||||
if (seletObj != null)
|
||||
{
|
||||
ItemSystem.ins.GetGridsRest(seletObj.startGrid, seletObj);
|
||||
seletObj = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
private UnLockGrid seletLockObj;
|
||||
public Grid stopGrid;
|
||||
private Vector3 oldvec;
|
||||
public int index = 2;
|
||||
@ -48,6 +78,8 @@ public class GameManager : MonoBehaviour
|
||||
break;
|
||||
}
|
||||
MapManager.ins.PlayBoxOpen();
|
||||
MapManager.ins.ResetLockGrid();
|
||||
ItemSystem.ins.ResetItemOrder();
|
||||
}
|
||||
|
||||
public void PackEvent()
|
||||
@ -99,6 +131,13 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (stopGrid.GetItemObj()!=null&& stopGrid.GetItemObj()!=seletObj)
|
||||
{
|
||||
ItemSystem.ins.ItemLevelUp(stopGrid.GetItemObj(), seletObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (MapManager.ins.openSave(stopGrid,seletObj))
|
||||
{
|
||||
foreach (var grid in seletObj._grids)
|
||||
@ -109,7 +148,14 @@ public class GameManager : MonoBehaviour
|
||||
seletObj.startGrid = stopGrid;
|
||||
ItemSystem.ins.GetGridsRest(seletObj.startGrid, seletObj);
|
||||
}
|
||||
}
|
||||
|
||||
if (seletObj!=null)
|
||||
{
|
||||
ItemSystem.ins.SetPosition(seletObj, seletObj.startGrid);
|
||||
}
|
||||
|
||||
ItemSystem.ins.ResetItemOrder();
|
||||
stopGrid = null;
|
||||
seletObj = null;
|
||||
MapManager.ins.ResetAnimation();
|
||||
@ -127,7 +173,6 @@ public class GameManager : MonoBehaviour
|
||||
if (MapManager.ins.GetRegionGridType(mousePos,out var type))
|
||||
{
|
||||
MapManager.ins.RegionGrid(mousePos, type, out var grid);
|
||||
Debug.LogError(grid.X+" "+grid.Y);
|
||||
if (stopGrid!=grid)
|
||||
{
|
||||
stopGrid = grid;
|
||||
@ -136,6 +181,27 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (seletUnlock!=null)
|
||||
{
|
||||
Ray rays = mainCamera.ScreenPointToRay(Input.mousePosition);
|
||||
RaycastHit hits;
|
||||
if (Physics.Raycast(rays, out hits))
|
||||
{
|
||||
//射线检测,第三个参数可根据需求设置或不设置,具体看api;
|
||||
Physics.Raycast(rays, out hits, 500000);
|
||||
Vector3 mousePos = hits.point + seletUnlock.mouseDev;
|
||||
if (MapManager.ins.GetRegionGridType(mousePos,out var type))
|
||||
{
|
||||
MapManager.ins.RegionGrid(mousePos, type, out var grid);
|
||||
if (stopGrid!=grid)
|
||||
{
|
||||
stopGrid = grid;
|
||||
MapManager.ins.LockRayRest(stopGrid, seletUnlock.openData,out var bo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Input.GetMouseButton(0) && seletObj!=null&& start)
|
||||
{
|
||||
Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Spine.Unity;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
@ -10,12 +12,14 @@ public class ItemObj : MonoBehaviour
|
||||
public GridType type = GridType.wait;
|
||||
public int ID => id;
|
||||
[SerializeField] private int id = 0;
|
||||
[SerializeField] private int maxLevel = 1;
|
||||
[SerializeField] private int maxLevel = 4;
|
||||
[SerializeField] private string itemName;
|
||||
public int Level => level;
|
||||
[SerializeField] private int level = 0;
|
||||
[SerializeField] private ItemSize size;
|
||||
|
||||
[SerializeField] public List<Grid> _grids;
|
||||
[SerializeField] private SkeletonAnimation spine;
|
||||
public Grid startGrid;
|
||||
public Vector3 dev;
|
||||
public Vector3 mouseDev;
|
||||
@ -25,16 +29,66 @@ public class ItemObj : MonoBehaviour
|
||||
_grids = _list;
|
||||
}
|
||||
|
||||
public bool LevelUp()
|
||||
public bool LevelUp(ItemObj itemObj)
|
||||
{
|
||||
if (level + 1 <= maxLevel) return false;
|
||||
if (itemObj.ID!=ID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (itemObj.Level!=Level)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (level + 1 >= maxLevel) return false;
|
||||
level++;
|
||||
ResetSkin();
|
||||
ResetAni();
|
||||
return true;
|
||||
}
|
||||
|
||||
public void ResetSkin()
|
||||
{
|
||||
spine.Skeleton.SetSkin(itemName+"/"+itemName+"_"+(level+1));
|
||||
spine.Skeleton.SetSlotsToSetupPose();
|
||||
}
|
||||
|
||||
private void ResetAni()
|
||||
{
|
||||
spine.state.SetAnimation(0, "a_1", false);
|
||||
}
|
||||
|
||||
public void ResetOrder()
|
||||
{
|
||||
if (_grids.Any(grid => grid.GetItemObj() != this))
|
||||
{
|
||||
spine.GetComponent<MeshRenderer>().sortingOrder = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
spine.GetComponent<MeshRenderer>().sortingOrder = 2;
|
||||
}
|
||||
|
||||
public bool CanSelected()
|
||||
{
|
||||
foreach (var grid in _grids)
|
||||
{
|
||||
if (grid.GetItemObj() != this)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
ResetSkin();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
@ -43,8 +43,8 @@ public class ItemSystem : MonoBehaviour
|
||||
{
|
||||
for (var j = itemData.y; j < itemData.y + item.itemSize.y; j++)
|
||||
{
|
||||
MapManager.ins.WaitGrids[i, j].item = item;
|
||||
//MapManager.ins.WaitGrids[i, j].SaveItemObj(item);
|
||||
// MapManager.ins.WaitGrids[i, j].item = item;
|
||||
MapManager.ins.WaitGrids[i, j].SaveItemObj(item);
|
||||
grids.Add(MapManager.ins.WaitGrids[i, j]);
|
||||
}
|
||||
}
|
||||
@ -94,6 +94,14 @@ public class ItemSystem : MonoBehaviour
|
||||
itemObj.type = grid.Type;
|
||||
}
|
||||
|
||||
public void ResetItemOrder()
|
||||
{
|
||||
foreach (var item in itemObjs)
|
||||
{
|
||||
item.ResetOrder();
|
||||
}
|
||||
}
|
||||
|
||||
public void PackItem()
|
||||
{
|
||||
foreach (var item in itemObjs)
|
||||
@ -109,14 +117,14 @@ public class ItemSystem : MonoBehaviour
|
||||
|
||||
public void ItemLevelUp(ItemObj item0,ItemObj item1)
|
||||
{
|
||||
if (item0!=item1)
|
||||
{
|
||||
if (item0.LevelUp())
|
||||
if (item0 == item1) return;
|
||||
if (!item0.LevelUp(item1)) return;
|
||||
foreach (var grid in item1._grids)
|
||||
{
|
||||
grid.Pop();
|
||||
}
|
||||
itemObjs.Remove(item1);
|
||||
Destroy(item1);
|
||||
}
|
||||
}
|
||||
Destroy(item1.gameObject);
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
|
@ -17,6 +17,8 @@ public class Grid : MonoBehaviour
|
||||
[SerializeField] private int gY;
|
||||
public SkeletonAnimation Spine => spine;
|
||||
[SerializeField] private SkeletonAnimation spine;
|
||||
public bool unLock => gridLock;
|
||||
[SerializeField] private bool gridLock = true;
|
||||
public ItemObj item;
|
||||
public Stack<ItemObj> stackItem=new Stack<ItemObj>();
|
||||
|
||||
@ -26,6 +28,18 @@ public class Grid : MonoBehaviour
|
||||
gY = ly;
|
||||
}
|
||||
|
||||
public void SetLock(bool gLock)
|
||||
{
|
||||
gridLock = gLock;
|
||||
if (gLock)
|
||||
{
|
||||
spine.gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
spine.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
public void SaveItemObj(ItemObj itemObj)
|
||||
{
|
||||
stackItem.Push(itemObj);
|
||||
@ -33,10 +47,24 @@ public class Grid : MonoBehaviour
|
||||
|
||||
public ItemObj itemObj()
|
||||
{
|
||||
RemoveNullStack();
|
||||
if (stackItem.Count==0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return stackItem.Peek();
|
||||
}
|
||||
|
||||
private ItemObj Pop()
|
||||
public void RemoveNullStack()
|
||||
{
|
||||
if (stackItem.Count>0&&stackItem.Peek()==null)
|
||||
{
|
||||
stackItem.Pop();
|
||||
RemoveNullStack();
|
||||
}
|
||||
}
|
||||
|
||||
public ItemObj Pop()
|
||||
{
|
||||
return stackItem.Pop();
|
||||
}
|
||||
@ -70,10 +98,36 @@ public class Grid : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public ItemObj GetItemObj()
|
||||
{
|
||||
return Type switch
|
||||
{
|
||||
GridType.box => item,
|
||||
GridType.wait => itemObj(),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case GridType.box:
|
||||
if (item!=null&& item.CanSelected())
|
||||
{
|
||||
GameManager.ins.seletObj = item;
|
||||
}
|
||||
break;
|
||||
case GridType.wait:
|
||||
if (itemObj()!=null && itemObj().CanSelected())
|
||||
{
|
||||
GameManager.ins.seletObj = itemObj();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum GridType
|
||||
|
@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Spine;
|
||||
using Spine.Unity;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class MapManager : MonoBehaviour
|
||||
@ -19,6 +20,8 @@ public class MapManager : MonoBehaviour
|
||||
[SerializeField] private Transform waitGridParent;
|
||||
[SerializeField] private List<Grid> _waitGridList;
|
||||
[SerializeField] private SkeletonAnimation boxSpine;
|
||||
public Transform lockParent=>unLockParent;
|
||||
[SerializeField] private Transform unLockParent;
|
||||
public Action boxani;
|
||||
public Grid[,] boxGrid;
|
||||
public Grid[,] WaitGrids;
|
||||
@ -69,6 +72,49 @@ public class MapManager : MonoBehaviour
|
||||
{
|
||||
PlayBoxAniStop(track.Animation.Name);
|
||||
};
|
||||
ResetLockGrid();
|
||||
}
|
||||
|
||||
public void ResetLockGrid()
|
||||
{
|
||||
foreach (var grid in _boxGridList)
|
||||
{
|
||||
boxGrid[grid.X, grid.Y].SetLock(false);
|
||||
}
|
||||
|
||||
for (int i = 3; i < 6; i++)
|
||||
{
|
||||
for (int j = 1; j < 4; j++)
|
||||
{
|
||||
boxGrid[i,j].SetLock(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool UnLockOpen(Grid grid,List<UnlockData> _list)
|
||||
{
|
||||
foreach (var data in _list)
|
||||
{
|
||||
if (boxGrid[grid.X + data.x, grid.Y + data.y].unLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void LockRayRest(Grid grid ,List<UnlockData> _list,out bool bo)
|
||||
{
|
||||
bo = false;
|
||||
if (UnLockOpen(grid,_list))
|
||||
{
|
||||
foreach (var data in _list)
|
||||
{
|
||||
boxGrid[grid.X + data.x, grid.Y + data.y].SetLock(true);
|
||||
}
|
||||
|
||||
bo = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 检测区域是否可以放置
|
||||
@ -98,6 +144,10 @@ public class MapManager : MonoBehaviour
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!boxGrid[i,j].unLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,6 +163,8 @@ public class MapManager : MonoBehaviour
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
for (int i = grid.X; i < grid.X+itemObj.itemSize.x; i++)
|
||||
{
|
||||
for (int j = grid.Y; j < grid.Y+itemObj.itemSize.y; j++)
|
||||
|
48
box1/Assets/Script/Map/UnLockGrid.cs
Normal file
48
box1/Assets/Script/Map/UnLockGrid.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UnLockGrid : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private int x;
|
||||
[SerializeField] private int y;
|
||||
public List<UnlockData> openData => openList;
|
||||
[SerializeField] private List<UnlockData> openList;
|
||||
public Vector3 MouseDev => mouseDev;
|
||||
[SerializeField] public Vector3 mouseDev;
|
||||
|
||||
public bool UnLockOpen(Grid grid, int x,int y)
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
GameManager.ins.seletUnlock = this;
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class UnlockData
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
}
|
11
box1/Assets/Script/Map/UnLockGrid.cs.meta
Normal file
11
box1/Assets/Script/Map/UnLockGrid.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9a1cc919c36e0844b30c3a1f12da1e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
87
box1/Assets/Script/Tool/InspectorGridDrawer.cs
Normal file
87
box1/Assets/Script/Tool/InspectorGridDrawer.cs
Normal file
@ -0,0 +1,87 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[System.Serializable]
|
||||
public class InspectorGrid
|
||||
{
|
||||
public int rows;
|
||||
public int columns;
|
||||
|
||||
[SerializeField]
|
||||
bool[] enabledBools;
|
||||
}
|
||||
|
||||
// ------
|
||||
|
||||
//用PropertyDrawer自定义Inspector面板显示外观
|
||||
[CustomPropertyDrawer(typeof(InspectorGrid))]
|
||||
public class InspectorGridDrawer : PropertyDrawer
|
||||
{
|
||||
float gridWidth = 15f;
|
||||
float gridHeight = 15f;
|
||||
float gridSpace = 1f;
|
||||
|
||||
int rows;
|
||||
int columns;
|
||||
|
||||
//自定义面板显示
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
//position: 在Inspector面板的位置、大小
|
||||
//property: 待绘制的属性
|
||||
//label: 值的字段名
|
||||
|
||||
//绘制一个SerializedProperty的属性字段
|
||||
EditorGUI.PropertyField(position, property, label, true);
|
||||
|
||||
//获取属性信息
|
||||
SerializedProperty data = property.FindPropertyRelative("enabledBools");
|
||||
rows = property.FindPropertyRelative("rows").intValue;
|
||||
columns = property.FindPropertyRelative("columns").intValue;
|
||||
|
||||
if (rows < 0)
|
||||
rows = 0;
|
||||
|
||||
if (columns < 0)
|
||||
columns = 0;
|
||||
|
||||
//指定数组大小
|
||||
data.arraySize = rows * columns;
|
||||
|
||||
//自定义显示区域
|
||||
if (property.isExpanded)
|
||||
{
|
||||
int count = 0;
|
||||
float targetX;
|
||||
float targetY;
|
||||
|
||||
//遍历
|
||||
for (int r = 0; r < rows; r++)
|
||||
{
|
||||
for (int c = 0; c < columns; c++)
|
||||
{
|
||||
//计算位置
|
||||
targetX = position.xMin + ((gridWidth + gridSpace) * (c + 1));
|
||||
targetY = 60 + position.yMin + (gridHeight + gridSpace) * (r + 1);
|
||||
//位置、大小
|
||||
Rect rect = new Rect(targetX, targetY, 15f * (EditorGUI.indentLevel + 1), gridHeight);
|
||||
//绘制属性值
|
||||
EditorGUI.PropertyField(rect, data.GetArrayElementAtIndex(count), GUIContent.none);
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//自定义高度
|
||||
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
|
||||
{
|
||||
//按照行数增加高度
|
||||
if (property.isExpanded)
|
||||
return EditorGUI.GetPropertyHeight(property) + 20 + (15 * (rows + 1));
|
||||
|
||||
return EditorGUI.GetPropertyHeight(property);
|
||||
}
|
||||
|
||||
}
|
11
box1/Assets/Script/Tool/InspectorGridDrawer.cs.meta
Normal file
11
box1/Assets/Script/Tool/InspectorGridDrawer.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cbf17b59ac786b489639118c40e7ebe
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -58,7 +58,7 @@ MonoBehaviour:
|
||||
CleanBuild: 0
|
||||
CustomNodePath:
|
||||
autoAdaptScreen: 1
|
||||
showMonitorSuggestModal: 1
|
||||
showMonitorSuggestModal: 0
|
||||
enableProfileStats: 0
|
||||
enableRenderAnalysis: 0
|
||||
enablePerfAnalysis: 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user