Commit a346681e authored by 范雪寒's avatar 范雪寒

feat: 选项

parent c2159e42
......@@ -128,5 +128,8 @@
}
}
},
"defaultProject": "ng-template-generator"
"defaultProject": "ng-template-generator",
"cli": {
"analytics": false
}
}
\ No newline at end of file
{
"ver": "1.1.0",
"uuid": "c551970e-b095-45f3-9f1d-25cde8b8deb1",
"uuid": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4",
"subMetas": {}
}
\ No newline at end of file
......@@ -17,7 +17,10 @@
"__id__": 2
},
{
"__id__": 48
"__id__": 69
},
{
"__id__": 73
}
],
"_active": true,
......@@ -78,25 +81,28 @@
"__id__": 18
},
{
"__id__": 21
"__id__": 23
},
{
"__id__": 32
"__id__": 34
},
{
"__id__": 34
"__id__": 36
},
{
"__id__": 50
}
],
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 66
},
{
"__id__": 46
"__id__": 67
},
{
"__id__": 47
"__id__": 68
}
],
"_prefab": null,
......@@ -782,19 +788,23 @@
},
{
"__type__": "cc.Node",
"_name": "question",
"_name": "QuestionLabelBg",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_children": [
{
"__id__": 19
}
],
"_active": true,
"_components": [
{
"__id__": 19
"__id__": 21
},
{
"__id__": 20
"__id__": 22
}
],
"_prefab": null,
......@@ -845,6 +855,104 @@
"groupIndex": 0,
"_id": "25JTpx3PtFtJP7K1cPwqpq"
},
{
"__type__": "cc.Node",
"_name": "QuestionLabelNode",
"_objFlags": 0,
"_parent": {
"__id__": 18
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 95,
"g": 15,
"b": 20,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 91.07,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-45,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9caQ7Yl0xO7bnICRKiZWqd"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c83eSosytNTbF8xtdrdq8O"
},
{
"__type__": "cc.Sprite",
"_name": "",
......@@ -913,16 +1021,16 @@
},
"_children": [
{
"__id__": 22
"__id__": 24
},
{
"__id__": 28
"__id__": 30
}
],
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 33
}
],
"_prefab": null,
......@@ -978,20 +1086,20 @@
"_name": "leef",
"_objFlags": 0,
"_parent": {
"__id__": 21
"__id__": 23
},
"_children": [
{
"__id__": 23
"__id__": 25
}
],
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 28
},
{
"__id__": 27
"__id__": 29
}
],
"_prefab": null,
......@@ -1044,46 +1152,46 @@
},
{
"__type__": "cc.Node",
"_name": "TittleImgNode",
"_name": "TittleLabelNode",
"_objFlags": 0,
"_parent": {
"__id__": 22
"__id__": 24
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 26
},
{
"__id__": 25
"__id__": 27
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 250,
"g": 211,
"b": 92,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
"width": 91.07,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-154.5,
30,
-181.5,
33.84,
0,
0,
0,
......@@ -1105,14 +1213,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "3cLQTCIwJIy5OMqLzTFHiS"
"_id": "dd1VVKr95K5oKiUbsQ+MTP"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"_materials": [
......@@ -1122,37 +1230,41 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c2LlHsflxGpId0j1OAjdis"
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 32,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "73588b7a-9fa6-4401-a693-8cb0a6c4e8e4"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "79fkcmuPJEzqefLdoN8vA6"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 40,
"_left": 33,
"_right": 0,
"_top": 25,
"_top": 19,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -1164,14 +1276,14 @@
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "7dAVQo6LhPNYzd67hUdxWP"
"_id": "18Hj7uxLdC5q4JgV4ovVM9"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 24
},
"_enabled": true,
"_materials": [
......@@ -1203,7 +1315,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 24
},
"_enabled": true,
"alignMode": 1,
......@@ -1230,16 +1342,16 @@
"_name": "leevies",
"_objFlags": 0,
"_parent": {
"__id__": 21
"__id__": 23
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
"__id__": 31
},
{
"__id__": 30
"__id__": 32
}
],
"_prefab": null,
......@@ -1295,7 +1407,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 30
},
"_enabled": true,
"_materials": [
......@@ -1327,7 +1439,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 30
},
"_enabled": true,
"alignMode": 1,
......@@ -1354,7 +1466,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
"__id__": 23
},
"_enabled": true,
"alignMode": 1,
......@@ -1387,7 +1499,7 @@
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 35
}
],
"_prefab": null,
......@@ -1415,7 +1527,7 @@
"array": [
0,
0,
813.617335208546,
709.2660518141165,
0,
0,
0,
......@@ -1443,7 +1555,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
"__id__": 34
},
"_enabled": true,
"_cullingMask": 4294967295,
......@@ -1483,19 +1595,19 @@
},
"_children": [
{
"__id__": 35
"__id__": 37
},
{
"__id__": 38
"__id__": 41
},
{
"__id__": 41
"__id__": 45
}
],
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 49
}
],
"_prefab": null,
......@@ -1551,16 +1663,19 @@
"_name": "BtnBefore",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 38
},
{
"__id__": 37
"__id__": 39
},
{
"__id__": 40
}
],
"_prefab": null,
......@@ -1574,7 +1689,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 45.00000000000006,
"width": 45,
"height": 46
},
"_anchorPoint": {
......@@ -1587,7 +1702,7 @@
"ctor": "Float64Array",
"array": [
-60,
5.818000000000001,
2,
0,
0,
0,
......@@ -1616,7 +1731,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"_materials": [
......@@ -1648,16 +1763,16 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 17.49999999999998,
"_right": 137.49999999999997,
"_alignFlags": 36,
"_left": 17.500000000000007,
"_right": 137.5,
"_top": -3.818000000000001,
"_bottom": 7.818000000000001,
"_bottom": 4,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
......@@ -1670,21 +1785,92 @@
"_originalHeight": 46,
"_id": "f6FahJiIVBvZFS200YJ3nQ"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "2eBweFcDFDppfbs1dT5HjJ"
},
{
"__type__": "cc.Node",
"_name": "BtnRefresh",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
"__id__": 42
},
{
"__id__": 40
"__id__": 43
},
{
"__id__": 44
}
],
"_prefab": null,
......@@ -1699,7 +1885,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 47,
"height": 57.000000000000014
"height": 57
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1711,7 +1897,7 @@
"ctor": "Float64Array",
"array": [
0,
10.964000000000002,
7.5,
0,
0,
0,
......@@ -1740,7 +1926,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
"__id__": 41
},
"_enabled": true,
"_materials": [
......@@ -1772,16 +1958,16 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
"__id__": 41
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_alignFlags": 36,
"_left": 76.5,
"_right": 76.5,
"_top": -14.464000000000006,
"_bottom": 7.463999999999996,
"_top": -14.463999999999999,
"_bottom": 4,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
......@@ -1795,35 +1981,970 @@
"_id": "04foc3RVJI7bEpSgAoTr4i"
},
{
"__type__": "cc.Node",
"_name": "BtnNext",
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"_parent": {
"__id__": 34
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
"node": {
"__id__": 41
},
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "0c95jTF8xLTL7usHrADoyd"
},
{
"__type__": "cc.Node",
"_name": "BtnNext",
"_objFlags": 0,
"_parent": {
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
},
{
"__id__": 47
},
{
"__id__": 48
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44,
"height": 46
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
60,
2,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "68XKmWmmRJzqgRGBax6pBj"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "16e86334-3345-46fd-aa00-629822491002"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "91/IESUVRJ1pMkqv5nKi+4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 138,
"_right": 17.999999999999993,
"_top": -3.818000000000001,
"_bottom": 4,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 44,
"_originalHeight": 46,
"_id": "6a+JJvtBZEI4w150S7DCVL"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "f4rYYbX5lKzYro5D30deUg"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 36
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 1080,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 200,
"_originalHeight": 0,
"_id": "99fXT4x5dFzrGDSu9J4su1"
},
{
"__type__": "cc.Node",
"_name": "OptionPosListBase",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 51
},
{
"__id__": 53
},
{
"__id__": 55
},
{
"__id__": 57
},
{
"__id__": 59
},
{
"__id__": 61
},
{
"__id__": 63
}
],
"_active": false,
"_components": [
{
"__id__": 65
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "47Gd6RmnFIM4BiIjDkNqUl"
},
{
"__type__": "cc.Node",
"_name": "Option_3_0",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-436,
-230,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8eIpVJlxxNBbMc5V/4dmSx"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "56mZ2cnINCbY/KWISJxBKC"
},
{
"__type__": "cc.Node",
"_name": "Option_3_1",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 54
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-28,
-241,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "fa22EpUfFJkrC4uhzdaoPk"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c5Izj+2SBCsp6gw6sowi4P"
},
{
"__type__": "cc.Node",
"_name": "Option_3_2",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
377,
-241,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a8i53xfUZI5JCA7QFXSO21"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a7mCwQ/g1F65MAKXQ54epG"
},
{
"__type__": "cc.Node",
"_name": "Option_4_0",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 58
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-450,
-241,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "220rZm+dpM940DpDv2bYrl"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 57
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a0+9BNI5JJupDypecZ1i/I"
},
{
"__type__": "cc.Node",
"_name": "Option_4_1",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 60
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-150,
-241,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "ceXAnvBHBG/aKDR4Kif1Gi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9a/9dRJSVMQKr9DuzSxFCR"
},
{
"__type__": "cc.Node",
"_name": "Option_4_2",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 62
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
150,
-241,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b39fK8XsVOV7wEADFA23WD"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 61
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "462FrrEPxC2oNsZ9/1VR3n"
},
{
"__type__": "cc.Node",
"_name": "Option_4_3",
"_objFlags": 0,
"_parent": {
"__id__": 50
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 64
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 44.000000000000014,
"height": 46
"width": 40,
"height": 36
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1834,8 +2955,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
60.00000000000001,
5.818000000000001,
450,
-241,
0,
0,
0,
......@@ -1857,14 +2978,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "68XKmWmmRJzqgRGBax6pBj"
"_id": "899Oufe19GqZFszfHEN/eu"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 63
},
"_enabled": true,
"_materials": [
......@@ -1875,10 +2996,10 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "16e86334-3345-46fd-aa00-629822491002"
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
......@@ -1889,47 +3010,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "91/IESUVRJ1pMkqv5nKi+4"
"_id": "14wG0XVWBFsbXutzUOkHb9"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 50
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 138,
"_right": 17.999999999999986,
"_top": -3.818000000000001,
"_bottom": 7.818000000000001,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 44,
"_originalHeight": 46,
"_id": "6a+JJvtBZEI4w150S7DCVL"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 44,
"_left": 1080,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
......@@ -1941,9 +3035,9 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 200,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "99fXT4x5dFzrGDSu9J4su1"
"_id": "10zhMcFZhLa5A3dmjvWI0q"
},
{
"__type__": "cc.Canvas",
......@@ -2001,17 +3095,17 @@
},
{
"__type__": "cc.Node",
"_name": "OptionNodeBase",
"_name": "OptionNodeBase_3",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 49
"__id__": 70
},
{
"__id__": 51
"__id__": 72
}
],
"_active": true,
......@@ -2069,13 +3163,13 @@
"_name": "OptionBg",
"_objFlags": 0,
"_parent": {
"__id__": 48
"__id__": 69
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 71
}
],
"_prefab": null,
......@@ -2131,7 +3225,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
"__id__": 70
},
"_enabled": true,
"_materials": [
......@@ -2160,10 +3254,10 @@
},
{
"__type__": "cc.Node",
"_name": "OptionDragonBoneBaseNOde",
"_name": "OptionDragonBoneBaseNode",
"_objFlags": 0,
"_parent": {
"__id__": 48
"__id__": 69
},
"_children": [],
"_active": true,
......@@ -2215,5 +3309,222 @@
"_groupIndex": 0,
"groupIndex": 0,
"_id": "dcBLD7MJNPJaLqidCcbBHK"
},
{
"__type__": "cc.Node",
"_name": "OptionNodeBase_4",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 74
},
{
"__id__": 76
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-754.428,
-580.04,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cc72NFcpdB37pnE7FSVwbJ"
},
{
"__type__": "cc.Node",
"_name": "OptionBg",
"_objFlags": 0,
"_parent": {
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 75
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 322,
"height": 115
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "0b6k2BEAZGBqY03zJMrmdq"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8471267b-453c-4c90-9bcd-d086725c0376"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "00x5gDHw9EgYibMXPZzYaS"
},
{
"__type__": "cc.Node",
"_name": "OptionDragonBoneBaseNode",
"_objFlags": 0,
"_parent": {
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "25LhJB5BZPg4J1l9gVSyC7"
}
]
\ No newline at end of file
......@@ -91,6 +91,84 @@ cc.Class({
if (this._onLoadFinishFunc && typeof (this._onLoadFinishFunc) == 'function') {
this._onLoadFinishFunc();
}
this.showQuestion();
},
initStatus() {
this.status = {
currentQuestionIdx: 0
}
},
initNodes() {
const tittleLabelNode = cc.find('Canvas/bgFrount/leef/TittleLabelNode');
tittleLabelNode.getComponent(cc.Label).string = this.data.tittleTxt;
},
initListeners() {
addButtonListener(cc.find('Canvas/BtnNode/BtnBefore'), () => {
if (this.status.currentQuestionIdx <= 0) {
return;
}
this.status.currentQuestionIdx--;
this.showQuestion();
});
addButtonListener(cc.find('Canvas/BtnNode/BtnNext'), () => {
if (this.status.currentQuestionIdx + 1 >= this.data.questionList.length) {
return;
}
this.status.currentQuestionIdx++;
this.showQuestion();
});
addButtonListener(cc.find('Canvas/BtnNode/BtnRefresh'), () => {
this.showQuestion();
});
},
updateBgSize() {
},
async showQuestion() {
this.showOptions();
await this.questionBoardDown();
},
showOptions() {
for (let i = 0; i < 4; i++) {
const optionNode = cc.find(`Canvas/optionNode_${i}`);
if (optionNode) {
optionNode.removeFromParent();
}
}
const optionList = this.data.questionList[this.status.currentQuestionIdx].optionList;
optionList.forEach(async (data, idx) => {
const optionNode = cc.instantiate(cc.find(`OptionNodeBase_${optionList.length}`));
optionNode.name = `optionNode_${idx}`;
optionNode.parent = cc.find('Canvas');
const posNode = cc.find(`Canvas/OptionPosListBase/Option_${optionList.length}_${idx}`)
optionNode.x = posNode.x;
optionNode.y = posNode.y;
const animeNode = await asyncLoadDragonBoneAnime(cc.find('OptionDragonBoneBaseNode', optionNode), data.optionDragonBone);
// await asyncPlayDragonBoneAnimation(cc.find('OptionDragonBoneBaseNode', optionNode), 'normal', 1);
});
},
async questionBoardDown() {
const questionLabel = cc.find('Canvas/QuestionLabelBg/QuestionLabelNode').getComponent(cc.Label);
questionLabel.string = this.data.questionList[this.status.currentQuestionIdx].questionTxt;
const labelBgNode = cc.find('Canvas/QuestionLabelBg');
await asyncTweenTo(labelBgNode, 1, { y: 263 });
},
async questionBoardUp() {
const labelBgNode = cc.find('Canvas/QuestionLabelBg');
await asyncTweenTo(labelBgNode, 1, { y: 463 });
},
});
module.exports = {
"tittleAudio": "http://staging-teach.cdn.ireadabc.com/23376490a9ba0f4a3fe0618fc1c935e1.mp3",
"tittleTxt": "I can do everything",
"questionList": [{
"questionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3",
"questionTxt": "I can stand up.",
"rightOptionIdx": 1,
"optionList": [{
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}, {
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}, {
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}]
}, {
"questionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3",
"questionTxt": "I can stand up.",
"rightOptionIdx": 1,
"optionList": [{
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}, {
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}, {
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}, {
"optionDragonBone": {
"skeJsonData": { "url": "" },
"texJsonData": { "url": "" },
"texPngData": { "url": "" }
},
"optionAudio": "http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3"
}]
}]
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "6a081092-5433-4e92-b7af-7734f74a9c2c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
!(function (global) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
// If regeneratorRuntime is defined globally and we're in a module,
// make the exports object identical to regeneratorRuntime.
module.exports = runtime;
}
// Don't bother evaluating the rest of this file if the runtime was
// already defined globally.
return;
}
// Define the runtime globally (as expected by generated code) as either
// module.exports (if we're in a module) or a new, empty object.
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() { }
function GeneratorFunction() { }
function GeneratorFunctionPrototype() { }
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] =
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function (method) {
prototype[method] = function (arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function (genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
runtime.mark = function (genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
runtime.awrap = function (arg) {
return { __await: arg };
};
function AsyncIterator(generator) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return Promise.resolve(value.__await).then(function (value) {
invoke("next", value, resolve, reject);
}, function (err) {
invoke("throw", err, resolve, reject);
});
}
return Promise.resolve(value).then(function (unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// result for this iteration will be rejected with the same
// reason. Note that rejections of yielded Promises are not
// thrown back into the generator function, as is the case
// when an awaited Promise is rejected. This difference in
// behavior between yield and await is important, because it
// allows the consumer to decide what to do with the yielded
// rejection (swallow it and continue, manually .throw it back
// into the generator, abandon iteration, whatever). With
// await, by contrast, there is no opportunity to examine the
// rejection reason outside the generator function, so the
// only option is to throw it from the await expression, and
// let the generator function handle the exception.
result.value = unwrapped;
resolve(result);
}, reject);
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new Promise(function (resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
runtime.async = function (innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList)
);
return runtime.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function (result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
if (delegate.iterator.return) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (!info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function () {
return this;
};
Gp.toString = function () {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function (object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function (skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function () {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function (exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function (type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function (record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function (finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function (tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function (iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
})(
// In sloppy mode, unbound `this` refers to the global object, fallback to
// Function constructor if we're in global strict mode. That is sadly a form
// of indirect eval which violates Content Security Policy.
(function () { return this })() || Function("return this")()
);
{
"ver": "1.0.8",
"uuid": "ef71d5e0-2ae1-48aa-b6c0-27634345db4c",
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -231,3 +231,105 @@ export async function asyncLoadImgByUrl(node, url) {
loadImgByUrl(node, url, resolve);
});
}
export function addButtonListener(btnNode, func) {
btnNode.on('click', async (btn) => {
if (btnNode.canNotClick) {
return;
}
btnNode.canNotClick = true;
playEffect('按钮');
await jelly(btnNode);
await func(btn);
btnNode.canNotClick = false;
});
}
export async function asyncLoadDragonBoneAnime(node, { skeJsonData: { url: skeJsonDataUrl }, texJsonData: { url: texJsonDataUrl }, texPngData: { url: texPngDataUrl } }) {
if (!texPngDataUrl || !texJsonDataUrl || !texPngDataUrl) {
return;
}
return new Promise((resolve, reject) => {
if (node.animaNode) {
node.animaNode.removeFromParent();
}
const animaNode = new cc.Node();
animaNode.name = 'animaNode';
animaNode.parent = node;
animaNode.active = true;
node.animaNode = animaNode;
const dragonDisplay = animaNode.addComponent(dragonBones.ArmatureDisplay);
// cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
// cc.assetManager.loadAny({ url: texJsonDataUrl }, (error, atlasJson) => {
// cc.assetManager.loadAny({ url: skeJsonDataUrl }, (error, dragonBonesJson) => {
// const atlas = new dragonBones.DragonBonesAtlasAsset();
// atlas.atlasJson = JSON.stringify(atlasJson);
// atlas.texture = texture;
// const asset = new dragonBones.DragonBonesAsset();
// asset.dragonBonesJson = JSON.stringify(dragonBonesJson);
// dragonDisplay.dragonAtlasAsset = atlas;
// dragonDisplay.dragonAsset = asset;
// let armatureNames = dragonBonesJson.armature.map(data => data.name);
// if (armatureNames.length > 0) {
// dragonDisplay.armatureName = armatureNames[0];
// }
// resolve(animaNode);
// });
// });
// });
const loadTexture = new Promise((resolve, reject) => {
cc.assetManager.loadRemote(texPngDataUrl, (error, texture) => {
if (error) {
reject(error);
}
resolve(texture);
});
});
const loadTexJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: texJsonDataUrl }, (error, atlasJson) => {
if (error) {
reject(error);
}
resolve(atlasJson);
});
});
const loadSkeJsonData = new Promise((resolve, reject) => {
cc.assetManager.loadAny({ url: skeJsonDataUrl }, (error, dragonBonesJson) => {
if (error) {
reject(error);
}
resolve(dragonBonesJson);
});
});
Promise.all([loadTexture, loadTexJsonData, loadSkeJsonData]).then(([texture, atlasJson, dragonBonesJson]) => {
const atlas = new dragonBones.DragonBonesAtlasAsset();
atlas.atlasJson = JSON.stringify(atlasJson);
atlas.texture = texture;
const asset = new dragonBones.DragonBonesAsset();
asset.dragonBonesJson = JSON.stringify(dragonBonesJson);
dragonDisplay.dragonAtlasAsset = atlas;
dragonDisplay.dragonAsset = asset;
let armatureNames = dragonBonesJson.armature.map(data => data.name);
if (armatureNames.length > 0) {
dragonDisplay.armatureName = armatureNames[0];
}
resolve(animaNode);
});
});
}
\ No newline at end of file
......@@ -11,7 +11,7 @@
"height": 154,
"platformSettings": {},
"subMetas": {
"option": {
"option_3": {
"ver": "1.0.4",
"uuid": "08a24fc8-782c-40d4-be3e-5123f1695dfb",
"rawTextureUuid": "e9bcc801-4c45-45ef-9761-a569328686c9",
......
{
"ver": "2.3.5",
"uuid": "7c942112-0d58-4846-a60c-0dd73b7abbd6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 322,
"height": 115,
"platformSettings": {},
"subMetas": {
"option_4": {
"ver": "1.0.4",
"uuid": "8471267b-453c-4c90-9bcd-d086725c0376",
"rawTextureUuid": "7c942112-0d58-4846-a60c-0dd73b7abbd6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 322,
"height": 115,
"rawWidth": 322,
"rawHeight": 115,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment