feat: dynamic sprite load
parent
715cea87f9
commit
bb88212218
|
@ -3,6 +3,7 @@
|
|||
"__type__": "cc.Prefab",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
|
@ -31,13 +32,10 @@
|
|||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -72,6 +70,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Sprite",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -93,7 +92,7 @@
|
|||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 30.310000000000002,
|
||||
"x": 30.310546875,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
|
@ -124,6 +123,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -151,6 +151,7 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -195,6 +196,7 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -243,6 +245,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -252,7 +255,7 @@
|
|||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 60.62,
|
||||
"width": 60.62109375,
|
||||
"height": 54.4
|
||||
},
|
||||
"_anchorPoint": {
|
||||
|
@ -270,6 +273,7 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -307,16 +311,30 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": "",
|
||||
"_enableOutline": true,
|
||||
"_outlineWidth": 2,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 102,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
}
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
@ -326,6 +344,7 @@
|
|||
"__type__": "7ea0aCduT5OYaPoiJan0I8j",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -390,23 +409,6 @@
|
|||
"preExtrapolation": 2,
|
||||
"postExtrapolation": 1
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "c5nnXEe4VJB4s9qYdfaoP/"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"__type__": "cc.Prefab",
|
||||
"_name": "itemNormal",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
|
@ -21,23 +22,23 @@
|
|||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 30
|
||||
},
|
||||
{
|
||||
"__id__": 32
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
},
|
||||
{
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
"__id__": 36
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -72,6 +73,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "top",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -86,14 +88,14 @@
|
|||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 23
|
||||
"__id__": 21
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -128,6 +130,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Sprite",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -177,6 +180,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -204,6 +208,7 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -261,6 +266,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -275,13 +281,10 @@
|
|||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 16
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -316,6 +319,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
|
@ -343,6 +347,7 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
|
@ -380,16 +385,30 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": "",
|
||||
"_enableOutline": true,
|
||||
"_outlineWidth": 4,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 96,
|
||||
"g": 96,
|
||||
"b": 96,
|
||||
"a": 255
|
||||
}
|
||||
},
|
||||
"_outlineWidth": 4,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
@ -399,6 +418,7 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
|
@ -430,23 +450,6 @@
|
|||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "76HqScksFCcZ6GUvSeKOhP"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "95uDDSqJpEvq+ATOvbMO/W"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
@ -464,12 +467,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -491,12 +495,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
"__id__": 20
|
||||
},
|
||||
"_alignFlags": 10,
|
||||
"_target": null,
|
||||
|
@ -539,24 +544,25 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 27
|
||||
},
|
||||
{
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 31
|
||||
"__id__": 29
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -591,12 +597,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
"__id__": 24
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -618,12 +625,13 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -655,6 +663,29 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -665,12 +696,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 28
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
|
@ -713,12 +745,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 31
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -740,12 +773,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 35
|
||||
"__id__": 33
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -784,18 +818,19 @@
|
|||
"__type__": "552d1g5QNpOeIBUm3Wr1J5c",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 37
|
||||
"__id__": 35
|
||||
},
|
||||
"_bg": {
|
||||
"__id__": 34
|
||||
"__id__": 32
|
||||
},
|
||||
"_scoreText": {
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
},
|
||||
"_topText": {
|
||||
"__id__": 12
|
||||
|
@ -822,6 +857,7 @@
|
|||
"__id__": 0
|
||||
},
|
||||
"fileId": "6bZKxhllhMCqrTReiih0t4",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
|
@ -3,6 +3,7 @@
|
|||
"__type__": "cc.Prefab",
|
||||
"_name": "itemTop1",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
|
@ -21,26 +22,26 @@
|
|||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 40
|
||||
},
|
||||
{
|
||||
"__id__": 42
|
||||
},
|
||||
{
|
||||
"__id__": 44
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 46
|
||||
"__id__": 44
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -75,6 +76,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "top",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -85,18 +87,18 @@
|
|||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -131,6 +133,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -145,13 +148,10 @@
|
|||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 12
|
||||
"__id__": 10
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -186,6 +186,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -213,6 +214,7 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -250,16 +252,30 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": "",
|
||||
"_enableOutline": true,
|
||||
"_outlineWidth": 4,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 102,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
}
|
||||
},
|
||||
"_outlineWidth": 4,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
@ -269,6 +285,7 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -300,23 +317,6 @@
|
|||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "5bQ0X7vzRNMr55LtO97SRv"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "40bKbcvN5E84Ydy7sEwJcK"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
@ -334,12 +334,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -361,12 +362,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -405,12 +407,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 16
|
||||
},
|
||||
"_alignFlags": 9,
|
||||
"_target": null,
|
||||
|
@ -453,24 +456,25 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -505,12 +509,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
"__id__": 20
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -532,12 +537,13 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -569,6 +575,29 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -579,12 +608,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
"__id__": 24
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
|
@ -630,14 +660,14 @@
|
|||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 29
|
||||
"__id__": 27
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "08db7198-bf32-48a4-b5c6-cb88bdb15478",
|
||||
|
@ -645,7 +675,7 @@
|
|||
},
|
||||
"fileId": "8dLJOK/3dIHrry1f3GsMwX",
|
||||
"instance": {
|
||||
"__id__": 30
|
||||
"__id__": 28
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
|
@ -658,21 +688,21 @@
|
|||
"mountedChildren": [],
|
||||
"mountedComponents": [
|
||||
{
|
||||
"__id__": 31
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 33
|
||||
},
|
||||
{
|
||||
"__id__": 35
|
||||
},
|
||||
{
|
||||
"__id__": 36
|
||||
},
|
||||
{
|
||||
"__id__": 37
|
||||
},
|
||||
{
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 39
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
|
@ -680,11 +710,11 @@
|
|||
{
|
||||
"__type__": "cc.MountedComponentsInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 32
|
||||
"__id__": 30
|
||||
},
|
||||
"components": [
|
||||
{
|
||||
"__id__": 33
|
||||
"__id__": 31
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -700,15 +730,15 @@
|
|||
"_objFlags": 0,
|
||||
"__editorExtras__": {
|
||||
"mountedRoot": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
}
|
||||
},
|
||||
"node": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 34
|
||||
"__id__": 32
|
||||
},
|
||||
"_alignFlags": 18,
|
||||
"_target": null,
|
||||
|
@ -737,7 +767,7 @@
|
|||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 36
|
||||
"__id__": 34
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
|
@ -753,7 +783,7 @@
|
|||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 36
|
||||
"__id__": 34
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
|
@ -768,7 +798,7 @@
|
|||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 36
|
||||
"__id__": 34
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
|
@ -784,7 +814,7 @@
|
|||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 36
|
||||
"__id__": 34
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
|
@ -800,12 +830,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 41
|
||||
"__id__": 39
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -827,12 +858,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 43
|
||||
"__id__": 41
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -871,15 +903,16 @@
|
|||
"__type__": "552d1g5QNpOeIBUm3Wr1J5c",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 45
|
||||
"__id__": 43
|
||||
},
|
||||
"_bg": {
|
||||
"__id__": 42
|
||||
"__id__": 40
|
||||
},
|
||||
"_highLightColor": {
|
||||
"__type__": "cc.Color",
|
||||
|
@ -907,7 +940,7 @@
|
|||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"__type__": "cc.Prefab",
|
||||
"_name": "itemTop2",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
|
@ -21,23 +22,23 @@
|
|||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 30
|
||||
},
|
||||
{
|
||||
"__id__": 32
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 34
|
||||
"__id__": 32
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -72,6 +73,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "top",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -82,18 +84,18 @@
|
|||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -128,6 +130,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -142,13 +145,10 @@
|
|||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 12
|
||||
"__id__": 10
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -183,6 +183,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -210,6 +211,7 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -247,16 +249,30 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": "",
|
||||
"_enableOutline": true,
|
||||
"_outlineWidth": 4,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 99,
|
||||
"g": 113,
|
||||
"b": 133,
|
||||
"a": 255
|
||||
}
|
||||
},
|
||||
"_outlineWidth": 4,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
@ -266,6 +282,7 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -297,23 +314,6 @@
|
|||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2abEt1Ja1CtqNxk3xMCJFo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "4eAtE+DrBIgb0jJv6fBI5r"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
@ -331,12 +331,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -358,12 +359,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -402,12 +404,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 16
|
||||
},
|
||||
"_alignFlags": 9,
|
||||
"_target": null,
|
||||
|
@ -450,24 +453,25 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -502,12 +506,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
"__id__": 20
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -529,12 +534,13 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -566,6 +572,29 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -576,12 +605,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
"__id__": 24
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
|
@ -624,12 +654,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 29
|
||||
"__id__": 27
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -651,12 +682,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 31
|
||||
"__id__": 29
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -695,18 +727,19 @@
|
|||
"__type__": "552d1g5QNpOeIBUm3Wr1J5c",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 31
|
||||
},
|
||||
"_bg": {
|
||||
"__id__": 30
|
||||
"__id__": 28
|
||||
},
|
||||
"_scoreText": {
|
||||
"__id__": 23
|
||||
"__id__": 21
|
||||
},
|
||||
"_topText": {
|
||||
"__id__": 6
|
||||
|
@ -733,6 +766,7 @@
|
|||
"__id__": 0
|
||||
},
|
||||
"fileId": "5dP05mPalLwZZ2b8ZT1A3S",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
|
@ -3,6 +3,7 @@
|
|||
"__type__": "cc.Prefab",
|
||||
"_name": "itemTop3",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
|
@ -21,23 +22,23 @@
|
|||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 30
|
||||
},
|
||||
{
|
||||
"__id__": 32
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 34
|
||||
"__id__": 32
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -72,6 +73,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "top",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
|
@ -82,18 +84,18 @@
|
|||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -128,6 +130,7 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
|
@ -142,13 +145,10 @@
|
|||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 12
|
||||
"__id__": 10
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -183,6 +183,7 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -210,6 +211,7 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -247,16 +249,30 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": "",
|
||||
"_enableOutline": true,
|
||||
"_outlineWidth": 4,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 126,
|
||||
"g": 41,
|
||||
"b": 19,
|
||||
"a": 255
|
||||
}
|
||||
},
|
||||
"_outlineWidth": 4,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
|
@ -266,6 +282,7 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
|
@ -297,23 +314,6 @@
|
|||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "26aSxa/n1HP4WeMiJZNg1Q"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "3e20tfG/ZEZqoVu6uSplwa"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
|
@ -331,12 +331,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -358,12 +359,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -402,12 +404,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
"__id__": 16
|
||||
},
|
||||
"_alignFlags": 9,
|
||||
"_target": null,
|
||||
|
@ -450,24 +453,25 @@
|
|||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
},
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
|
@ -502,12 +506,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
"__id__": 20
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -529,12 +534,13 @@
|
|||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 24
|
||||
"__id__": 22
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -566,6 +572,29 @@
|
|||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -576,12 +605,13 @@
|
|||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 20
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
"__id__": 24
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
|
@ -624,12 +654,13 @@
|
|||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 29
|
||||
"__id__": 27
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
|
@ -651,12 +682,13 @@
|
|||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 31
|
||||
"__id__": 29
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
|
@ -695,18 +727,19 @@
|
|||
"__type__": "552d1g5QNpOeIBUm3Wr1J5c",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 33
|
||||
"__id__": 31
|
||||
},
|
||||
"_bg": {
|
||||
"__id__": 30
|
||||
"__id__": 28
|
||||
},
|
||||
"_scoreText": {
|
||||
"__id__": 23
|
||||
"__id__": 21
|
||||
},
|
||||
"_topText": {
|
||||
"__id__": 6
|
||||
|
@ -733,6 +766,7 @@
|
|||
"__id__": 0
|
||||
},
|
||||
"fileId": "ceuq3bJktG3ojoU7UZJ27S",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,20 @@
|
|||
import { _decorator, CCString, Component, Node, Sprite } from 'cc';
|
||||
import DynamicSpriteManager from './Manager/DynamicSpriteManager';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DynamicSprite')
|
||||
export default class DynamicSprite extends Component {
|
||||
@property(Sprite)
|
||||
private sprite: Sprite;
|
||||
|
||||
@property(CCString)
|
||||
private id: string;
|
||||
|
||||
protected async start(): Promise<void> {
|
||||
const spriteFrame = await DynamicSpriteManager.instance.getSpriteFrame(this.id);
|
||||
if (spriteFrame) {
|
||||
this.sprite.spriteFrame = spriteFrame;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "632bc830-c894-42dd-b230-660aac8ed35f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -1,23 +1,23 @@
|
|||
import {
|
||||
_decorator,
|
||||
AudioClip,
|
||||
CCFloat,
|
||||
CCInteger,
|
||||
Collider2D,
|
||||
Component,
|
||||
Contact2DType,
|
||||
geometry,
|
||||
math,
|
||||
Node,
|
||||
Vec3,
|
||||
tween,
|
||||
Collider2D,
|
||||
Sprite,
|
||||
Contact2DType,
|
||||
AudioClip,
|
||||
tween,
|
||||
Tween,
|
||||
Vec3,
|
||||
} from 'cc';
|
||||
import { EventManger } from '../Manager/EventManger';
|
||||
import GameEvent from '../Events/GameEvent';
|
||||
import ScoreType from '../Enum/ScoreType';
|
||||
import GameState from '../Enum/GameState';
|
||||
import ScoreType from '../Enum/ScoreType';
|
||||
import GameEvent from '../Events/GameEvent';
|
||||
import { EventManger } from '../Manager/EventManger';
|
||||
import { SoundManager } from '../Manager/SoundManager';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
import { _decorator, assetManager, Component, ImageAsset, JsonAsset, Node, SpriteFrame, Texture2D } from 'cc';
|
||||
import Singleton from '../Singleton';
|
||||
import Utilities from '../Utilities';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DynamicSpriteManager')
|
||||
export default class DynamicSpriteManager extends Singleton<DynamicSpriteManager>() {
|
||||
@property(JsonAsset)
|
||||
private jsonConfig: JsonAsset;
|
||||
|
||||
private spriteMap: Map<string, SpriteFrame> = new Map();
|
||||
private initialized = false;
|
||||
|
||||
protected onLoad(): void {
|
||||
super.onLoad();
|
||||
this.init();
|
||||
}
|
||||
|
||||
private async init() {
|
||||
const config = this.jsonConfig.json;
|
||||
|
||||
for (let i = 0; i < config.length; i++) {
|
||||
const el = config[i];
|
||||
try {
|
||||
const spriteFrame = await this.loadSprite(el.URL);
|
||||
this.spriteMap.set(el.ID, spriteFrame);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
private loadSprite(url: string): Promise<SpriteFrame> {
|
||||
return new Promise((resolve, reject) => {
|
||||
assetManager.loadRemote<ImageAsset>(url, (err, imageAsset) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
const spriteFrame = new SpriteFrame();
|
||||
const texture = new Texture2D();
|
||||
texture.image = imageAsset;
|
||||
spriteFrame.texture = texture;
|
||||
resolve(spriteFrame);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public async getSpriteFrame(id: string): Promise<SpriteFrame> {
|
||||
await Utilities.waitUntil(() => this.initialized);
|
||||
return this.spriteMap.get(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0276bc08-4ccf-4017-b140-cf7a1154d4d7",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
import {
|
||||
_decorator,
|
||||
AudioClip,
|
||||
CCInteger,
|
||||
Color,
|
||||
EPhysics2DDrawFlags,
|
||||
Node,
|
||||
PhysicsSystem2D,
|
||||
Prefab,
|
||||
Quat,
|
||||
randomRangeInt,
|
||||
SpriteFrame,
|
||||
Vec2,
|
||||
Vec3,
|
||||
randomRangeInt,
|
||||
CCInteger,
|
||||
AudioClip,
|
||||
Quat,
|
||||
EPhysics2DDrawFlags,
|
||||
PhysicsSystem2D,
|
||||
SpriteFrame,
|
||||
Color,
|
||||
} from 'cc';
|
||||
import ObjectPool from '../Pool/ObjectPool';
|
||||
import { Ball } from '../GamePlay/Ball';
|
||||
import Utilities from '../Utilities';
|
||||
import GameState from '../Enum/GameState';
|
||||
import { EventManger } from './EventManger';
|
||||
import GameEvent from '../Events/GameEvent';
|
||||
import ScoreType from '../Enum/ScoreType';
|
||||
import { FloatingText } from '../Environments/FloatingText';
|
||||
import { SoundManager } from './SoundManager';
|
||||
import TimeConfig from '../Enum/TimeConfig';
|
||||
import BEConnector from '../API/BEConnector';
|
||||
import BoosterType from '../Enum/BoosterType';
|
||||
import GameState from '../Enum/GameState';
|
||||
import ScoreType from '../Enum/ScoreType';
|
||||
import TimeConfig from '../Enum/TimeConfig';
|
||||
import { FloatingText } from '../Environments/FloatingText';
|
||||
import GameEvent from '../Events/GameEvent';
|
||||
import { Ball } from '../GamePlay/Ball';
|
||||
import ObjectPool from '../Pool/ObjectPool';
|
||||
import Singleton from '../Singleton';
|
||||
import Utilities from '../Utilities';
|
||||
import { EventManger } from './EventManger';
|
||||
import { SoundManager } from './SoundManager';
|
||||
import { StickerManager } from './StickerManager';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ export class StickerManager extends Singleton<StickerManager>() {
|
|||
this._label.string = string;
|
||||
this._label.color = opts?.color || new Color('#FFFF00');
|
||||
this._label.node.setPosition(opts?.position || Vec3.ZERO);
|
||||
this._label.getComponent(LabelOutline).color = opts?.outLineColor || new Color('#FF6600');
|
||||
this._label.outlineColor = opts?.outLineColor || new Color('#FF6600');
|
||||
|
||||
Tween.stopAllByTarget(this._label.node);
|
||||
tween(this._label.node)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
{
|
||||
"ID": "carrot_default",
|
||||
"URL": "https://cdn11.bigcommerce.com/s-kc25pb94dz/images/stencil/1280x1280/products/271/762/Carrot__40927.1634584458.jpg"
|
||||
}
|
||||
]
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "d3d19129-bf34-488d-9d39-737eced907ae",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.unload = exports.load = exports.methods = void 0;
|
||||
// @ts-ignore
|
||||
const package_json_1 = __importDefault(require("../package.json"));
|
||||
/**
|
||||
* @en
|
||||
* @zh 为扩展的主进程的注册方法
|
||||
*/
|
||||
exports.methods = {
|
||||
openPanel() {
|
||||
Editor.Panel.open(package_json_1.default.name);
|
||||
},
|
||||
};
|
||||
/**
|
||||
* @en Hooks triggered after extension loading is complete
|
||||
* @zh 扩展加载完成后触发的钩子
|
||||
*/
|
||||
function load() { }
|
||||
exports.load = load;
|
||||
/**
|
||||
* @en Hooks triggered after extension uninstallation is complete
|
||||
* @zh 扩展卸载完成后触发的钩子
|
||||
*/
|
||||
function unload() { }
|
||||
exports.unload = unload;
|
|
@ -0,0 +1,169 @@
|
|||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const package_json_1 = __importDefault(require("../../../package.json"));
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path_1 = require("path");
|
||||
const xlsx_1 = require("xlsx");
|
||||
/**
|
||||
* @zh 如果希望兼容 3.3 之前的版本可以使用下方的代码
|
||||
* @en You can add the code below if you want compatibility with versions prior to 3.3
|
||||
*/
|
||||
// Editor.Panel.define = Editor.Panel.define || function(options: any) { return options }
|
||||
module.exports = Editor.Panel.define({
|
||||
listeners: {
|
||||
show() { },
|
||||
hide() { },
|
||||
},
|
||||
template: (0, fs_extra_1.readFileSync)((0, path_1.join)(__dirname, "../../../static/template/default/index.html"), "utf-8"),
|
||||
style: (0, fs_extra_1.readFileSync)((0, path_1.join)(__dirname, "../../../static/style/default/index.css"), "utf-8"),
|
||||
$: {
|
||||
excelFile: "#excelAsset",
|
||||
fileName: "#fileName",
|
||||
out: "#out",
|
||||
sheetName: "#sheetName",
|
||||
submit: "#submit",
|
||||
range: "#range",
|
||||
exclude: "#exclude",
|
||||
blankRow: "#blankRow",
|
||||
blankCell: "#blankCell",
|
||||
useHeader: "#useHeader",
|
||||
},
|
||||
methods: {
|
||||
async loadFormData() {
|
||||
const data = await Editor.Profile.getConfig(package_json_1.default.name, "excelToJsonData");
|
||||
if (data) {
|
||||
const inputFile = this.$.excelFile;
|
||||
const fileName = this.$.fileName;
|
||||
const outputFile = this.$.out;
|
||||
const sheetName = this.$.sheetName;
|
||||
const exclude = this.$.exclude;
|
||||
const range = this.$.range;
|
||||
const blankRow = this.$.blankRow;
|
||||
const blankCell = this.$.blankCell;
|
||||
const useHeader = this.$.useHeader;
|
||||
inputFile.value = data.inputFile;
|
||||
fileName.value = data.fileName;
|
||||
outputFile.value = data.outputFile;
|
||||
sheetName.value = data.sheetName;
|
||||
exclude.value = data.exclude;
|
||||
range.value = data.range;
|
||||
blankRow.value = data.blankRow;
|
||||
blankCell.value = data.blankCell;
|
||||
useHeader.value = data.useHeader;
|
||||
}
|
||||
else {
|
||||
setTimeout(() => {
|
||||
//@ts-ignore
|
||||
this.$.out.value = "project://assets";
|
||||
}, 100);
|
||||
}
|
||||
},
|
||||
async convertToJson(url) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
||||
const fileName = this.$.fileName;
|
||||
const outputFile = this.$.out;
|
||||
const sheetName = this.$.sheetName;
|
||||
const exclude = this.$.exclude;
|
||||
const range = this.$.range;
|
||||
const blankRow = this.$.blankRow;
|
||||
const blankCell = this.$.blankCell;
|
||||
const useHeader = this.$.useHeader;
|
||||
const data = {
|
||||
inputFile: url,
|
||||
fileName: fileName.value,
|
||||
outputFile: outputFile.value,
|
||||
sheetName: sheetName.value,
|
||||
blankRow: blankRow.value,
|
||||
blankCell: blankCell.value,
|
||||
exclude: exclude.value,
|
||||
range: range.value,
|
||||
useHeader: useHeader.value,
|
||||
};
|
||||
const excludeSheet = data.exclude.split(/\s*,\s*/);
|
||||
const getRow = (sheet) => {
|
||||
return xlsx_1.utils.sheet_to_json(sheet, {
|
||||
raw: true,
|
||||
rawNumbers: true,
|
||||
defval: !!data.blankCell ? null : undefined,
|
||||
blankrows: !!data.blankRow,
|
||||
range: !!data.range ? data.range : undefined,
|
||||
header: !!data.useHeader ? undefined : 1,
|
||||
});
|
||||
};
|
||||
if (outputFile.getAttribute("invalid")) {
|
||||
await Editor.Dialog.warn("Warning", {
|
||||
detail: "Output path invalid",
|
||||
});
|
||||
outputFile.focus();
|
||||
(_a = this.$.submit) === null || _a === void 0 ? void 0 : _a.removeAttribute("disabled");
|
||||
(_b = this.$.submit) === null || _b === void 0 ? void 0 : _b.removeAttribute("loading");
|
||||
return;
|
||||
}
|
||||
if (!data.fileName) {
|
||||
await Editor.Dialog.warn("Warning", {
|
||||
detail: "Output name is required",
|
||||
});
|
||||
fileName.focus();
|
||||
(_c = this.$.submit) === null || _c === void 0 ? void 0 : _c.removeAttribute("disabled");
|
||||
(_d = this.$.submit) === null || _d === void 0 ? void 0 : _d.removeAttribute("loading");
|
||||
return;
|
||||
}
|
||||
if (excludeSheet.length > 1 &&
|
||||
excludeSheet.includes(data.sheetName)) {
|
||||
await Editor.Dialog.warn("Warning", {
|
||||
detail: `Sheet ${sheetName} in exclude sheet`,
|
||||
});
|
||||
sheetName.focus();
|
||||
(_e = this.$.submit) === null || _e === void 0 ? void 0 : _e.removeAttribute("disabled");
|
||||
(_f = this.$.submit) === null || _f === void 0 ? void 0 : _f.removeAttribute("loading");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const workBook = (0, xlsx_1.readFile)(url, {
|
||||
type: "binary",
|
||||
});
|
||||
let result = {};
|
||||
if (data.sheetName) {
|
||||
const row = getRow(workBook.Sheets[data.sheetName]);
|
||||
if (row.length > 0)
|
||||
result = row;
|
||||
}
|
||||
else {
|
||||
workBook.SheetNames.forEach((name) => {
|
||||
if (excludeSheet.includes(name))
|
||||
return;
|
||||
const row = getRow(workBook.Sheets[name]);
|
||||
if (row.length > 0)
|
||||
result[name] = row;
|
||||
});
|
||||
}
|
||||
const output = data.outputFile.replace("project://", "db://");
|
||||
await Editor.Message.request("asset-db", "create-asset", output + `/${data.fileName}.json`, JSON.stringify(result));
|
||||
(_g = this.$.submit) === null || _g === void 0 ? void 0 : _g.removeAttribute("disabled");
|
||||
(_h = this.$.submit) === null || _h === void 0 ? void 0 : _h.removeAttribute("loading");
|
||||
Editor.Profile.setConfig(package_json_1.default.name, "excelToJsonData", data);
|
||||
}
|
||||
catch (e) {
|
||||
await Editor.Dialog.error("Error", { detail: e.message });
|
||||
(_j = this.$.submit) === null || _j === void 0 ? void 0 : _j.removeAttribute("disabled");
|
||||
(_k = this.$.submit) === null || _k === void 0 ? void 0 : _k.removeAttribute("loading");
|
||||
}
|
||||
},
|
||||
},
|
||||
ready() {
|
||||
var _a;
|
||||
this.loadFormData();
|
||||
(_a = this.$.submit) === null || _a === void 0 ? void 0 : _a.addEventListener("confirm", (event) => {
|
||||
var _a, _b;
|
||||
const inputFile = this.$.excelFile;
|
||||
(_a = this.$.submit) === null || _a === void 0 ? void 0 : _a.setAttribute("disabled", "true");
|
||||
(_b = this.$.submit) === null || _b === void 0 ? void 0 : _b.setAttribute("loading", "true");
|
||||
Editor.Message.send("excel-extension", "convertToJson", inputFile.value);
|
||||
});
|
||||
},
|
||||
beforeClose() { },
|
||||
close() { },
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
"use strict";module.exports={open_panel:"Default Panel",send_to_panel:"Send message to Default Panel",description:"Extension with a panel"};
|
|
@ -0,0 +1 @@
|
|||
"use strict";module.exports={open_panel:"默认面板",send_to_panel:"发送消息给面板",description:"含有一个面板的扩展"};
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"package_version": 2,
|
||||
"version": "1.0.0",
|
||||
"name": "excel-extension",
|
||||
"description": "i18n:excel-extension.description",
|
||||
"main": "./dist/main.js",
|
||||
"dependencies": {
|
||||
"fs-extra": "^10.0.0",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.5",
|
||||
"@types/node": "^16.0.1",
|
||||
"typescript": "^4.3.4"
|
||||
},
|
||||
"panels": {
|
||||
"default": {
|
||||
"title": "Excel To Json",
|
||||
"type": "dockable",
|
||||
"main": "dist/panels/default",
|
||||
"size": {
|
||||
"min-width": 550,
|
||||
"min-height": 330,
|
||||
"width": 550,
|
||||
"height": 330
|
||||
}
|
||||
}
|
||||
},
|
||||
"contributions": {
|
||||
"menu": [
|
||||
{
|
||||
"path": "Excel Extension",
|
||||
"label": "Excel To Json",
|
||||
"message": "open-panel"
|
||||
}
|
||||
],
|
||||
"messages": {
|
||||
"open-panel": {
|
||||
"methods": [
|
||||
"openPanel"
|
||||
]
|
||||
},
|
||||
"convertToJson": {
|
||||
"methods": [
|
||||
"default.convertToJson"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"author": "Tiendat",
|
||||
"editor": ">=3.7.2",
|
||||
"scripts": {
|
||||
"build": "tsc -b",
|
||||
"watch": "tsc -w"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#app {
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.container ui-prop ~ ui-prop {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#submit {
|
||||
height: 32px;
|
||||
width: 100px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.check-box ~ .check-box {
|
||||
margin-left: 16px;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<div id="app">
|
||||
<h1 class="title">Excel To Json</h1>
|
||||
<div class="container">
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Excel File</ui-label>
|
||||
<ui-file slot="content" type="file" id="excelAsset" extensions="xls,xlsx"></ui-file>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Output Path</ui-label>
|
||||
<ui-file slot="content" type="directory" protocols="project" id="out" value="project://assets/"></ui-file>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Output Name</ui-label>
|
||||
<ui-input slot="content" id="fileName" value="newData"></ui-input>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Sheet Name</ui-label>
|
||||
<ui-input slot="content" placeholder="optional" id="sheetName" value=""></ui-input>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Range</ui-label>
|
||||
<ui-input slot="content" placeholder="optional" id="range"></ui-input>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Exclude Sheet Name</ui-label>
|
||||
<ui-input slot="content" placeholder="optional" id="exclude"></ui-input>
|
||||
</ui-prop>
|
||||
<ui-prop>
|
||||
<ui-label slot="label">Options</ui-label>
|
||||
<div slot="content">
|
||||
<ui-checkbox class="check-box" id="blankRow" value="true">Blank Row</ui-checkbox>
|
||||
<ui-checkbox class="check-box" id="blankCell" value="true">Blank Cell</ui-checkbox>
|
||||
<ui-checkbox class="check-box" id="useHeader" value="true">Use Header</ui-checkbox>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<div class="footer">
|
||||
<ui-button id="submit" type="primary">Convert</ui-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -40,11 +40,11 @@
|
|||
}
|
||||
],
|
||||
"collisionMatrix": {
|
||||
"0": 21,
|
||||
"0": 4,
|
||||
"1": 4,
|
||||
"2": 119,
|
||||
"3": 16,
|
||||
"4": 29,
|
||||
"4": 12,
|
||||
"5": 4,
|
||||
"6": 4
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue