Commit 6a447bde authored by yu's avatar yu

10.13调整

parent 1841778a
...@@ -84,22 +84,22 @@ ...@@ -84,22 +84,22 @@
"__id__": 128 "__id__": 128
}, },
{ {
"__id__": 144 "__id__": 145
}, },
{ {
"__id__": 157 "__id__": 158
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 165
},
{ {
"__id__": 166 "__id__": 166
}, },
{ {
"__id__": 167 "__id__": 167
},
{
"__id__": 168
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1768,7 +1768,7 @@ ...@@ -1768,7 +1768,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -2034,7 +2034,7 @@ ...@@ -2034,7 +2034,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -2300,7 +2300,7 @@ ...@@ -2300,7 +2300,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -2566,7 +2566,7 @@ ...@@ -2566,7 +2566,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -2832,7 +2832,7 @@ ...@@ -2832,7 +2832,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -2993,7 +2993,7 @@ ...@@ -2993,7 +2993,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "chips_6", "_name": "chips_7",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 33
...@@ -3098,7 +3098,7 @@ ...@@ -3098,7 +3098,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -3364,7 +3364,7 @@ ...@@ -3364,7 +3364,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -3630,7 +3630,7 @@ ...@@ -3630,7 +3630,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -3896,7 +3896,7 @@ ...@@ -3896,7 +3896,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -4162,7 +4162,7 @@ ...@@ -4162,7 +4162,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -4323,7 +4323,7 @@ ...@@ -4323,7 +4323,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "chips_7", "_name": "chips_6",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 33 "__id__": 33
...@@ -4428,7 +4428,7 @@ ...@@ -4428,7 +4428,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -4694,7 +4694,7 @@ ...@@ -4694,7 +4694,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, 3,
0, 0,
0, 0,
0, 0,
...@@ -6267,7 +6267,7 @@ ...@@ -6267,7 +6267,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 46.16,
"height": 57.96 "height": 57.96
}, },
"_anchorPoint": { "_anchorPoint": {
...@@ -6280,7 +6280,7 @@ ...@@ -6280,7 +6280,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
112.338, 112.338,
0, -6,
0, 0,
0, 0,
0, 0,
...@@ -6319,8 +6319,8 @@ ...@@ -6319,8 +6319,8 @@
], ],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_string": "", "_string": "fg",
"_N$string": "", "_N$string": "fg",
"_fontSize": 46, "_fontSize": 46,
"_lineHeight": 46, "_lineHeight": 46,
"_enableWrapText": true, "_enableWrapText": true,
...@@ -6478,16 +6478,16 @@ ...@@ -6478,16 +6478,16 @@
"__id__": 129 "__id__": 129
}, },
{ {
"__id__": 131 "__id__": 132
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 142 "__id__": 143
}, },
{ {
"__id__": 143 "__id__": 144
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6550,6 +6550,9 @@ ...@@ -6550,6 +6550,9 @@
"_components": [ "_components": [
{ {
"__id__": 130 "__id__": 130
},
{
"__id__": 131
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6575,7 +6578,7 @@ ...@@ -6575,7 +6578,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-772.849, -810,
0, 0,
0, 0,
0, 0,
...@@ -6635,6 +6638,33 @@ ...@@ -6635,6 +6638,33 @@
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "c2By6v55BEsLTY0nVGY7sc" "_id": "c2By6v55BEsLTY0nVGY7sc"
}, },
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 129
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 150,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "cc+sgOyZNNJIO97Be4SzVs"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "layout_mouse", "_name": "layout_mouse",
...@@ -6644,13 +6674,13 @@ ...@@ -6644,13 +6674,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 132 "__id__": 133
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 141 "__id__": 142
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6677,7 +6707,7 @@ ...@@ -6677,7 +6707,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-493, 0,
0, 0,
0, 0,
0, 0,
...@@ -6706,20 +6736,20 @@ ...@@ -6706,20 +6736,20 @@
"_name": "img", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 131 "__id__": 132
}, },
"_children": [ "_children": [
{ {
"__id__": 133 "__id__": 134
}, },
{ {
"__id__": 135 "__id__": 136
}, },
{ {
"__id__": 137 "__id__": 138
}, },
{ {
"__id__": 139 "__id__": 140
} }
], ],
"_active": false, "_active": false,
...@@ -6777,13 +6807,13 @@ ...@@ -6777,13 +6807,13 @@
"_name": "star_bg", "_name": "star_bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 132 "__id__": 133
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 134 "__id__": 135
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6839,7 +6869,7 @@ ...@@ -6839,7 +6869,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 133 "__id__": 134
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6871,13 +6901,13 @@ ...@@ -6871,13 +6901,13 @@
"_name": "star", "_name": "star",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 132 "__id__": 133
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 136 "__id__": 137
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6933,7 +6963,7 @@ ...@@ -6933,7 +6963,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 135 "__id__": 136
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -6965,13 +6995,13 @@ ...@@ -6965,13 +6995,13 @@
"_name": "icon_bigstar", "_name": "icon_bigstar",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 132 "__id__": 133
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 138 "__id__": 139
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -6985,8 +7015,8 @@ ...@@ -6985,8 +7015,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 54, "width": 150,
"height": 66 "height": 150
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -7027,7 +7057,7 @@ ...@@ -7027,7 +7057,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 137 "__id__": 138
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7038,7 +7068,7 @@ ...@@ -7038,7 +7068,7 @@
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "418d1207-fc15-4e3e-b84e-ef0752749e3f" "__uuid__": "7d20a4d1-bc99-4d20-a15a-38163399246d"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 2, "_sizeMode": 2,
...@@ -7059,13 +7089,13 @@ ...@@ -7059,13 +7089,13 @@
"_name": "star_wrong", "_name": "star_wrong",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 132 "__id__": 133
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 140 "__id__": 141
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7121,7 +7151,7 @@ ...@@ -7121,7 +7151,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 139 "__id__": 140
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7153,7 +7183,7 @@ ...@@ -7153,7 +7183,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 131 "__id__": 132
}, },
"_enabled": true, "_enabled": true,
"position": { "position": {
...@@ -7237,22 +7267,22 @@ ...@@ -7237,22 +7267,22 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 145 "__id__": 146
}, },
{ {
"__id__": 148 "__id__": 149
}, },
{ {
"__id__": 150 "__id__": 151
}, },
{ {
"__id__": 153 "__id__": 154
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 156 "__id__": 157
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7308,16 +7338,16 @@ ...@@ -7308,16 +7338,16 @@
"_name": "New Sprite(Splash)", "_name": "New Sprite(Splash)",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 145
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 146 "__id__": 147
}, },
{ {
"__id__": 147 "__id__": 148
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7373,7 +7403,7 @@ ...@@ -7373,7 +7403,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 145 "__id__": 146
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7405,7 +7435,7 @@ ...@@ -7405,7 +7435,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 145 "__id__": 146
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -7432,13 +7462,13 @@ ...@@ -7432,13 +7462,13 @@
"_name": "finish_db", "_name": "finish_db",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 145
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 149 "__id__": 150
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7494,7 +7524,7 @@ ...@@ -7494,7 +7524,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 148 "__id__": 149
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7534,16 +7564,16 @@ ...@@ -7534,16 +7564,16 @@
"_name": "btn_again", "_name": "btn_again",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 145
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 151 "__id__": 152
}, },
{ {
"__id__": 152 "__id__": 153
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7570,14 +7600,14 @@ ...@@ -7570,14 +7600,14 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-80, -100,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
1, 1.5,
1, 1.5,
1 1
] ]
}, },
...@@ -7599,7 +7629,7 @@ ...@@ -7599,7 +7629,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 150 "__id__": 151
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7631,7 +7661,7 @@ ...@@ -7631,7 +7661,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 150 "__id__": 151
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -7699,16 +7729,16 @@ ...@@ -7699,16 +7729,16 @@
"_name": "btn_next", "_name": "btn_next",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 144 "__id__": 145
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 154 "__id__": 155
}, },
{ {
"__id__": 155 "__id__": 156
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7735,14 +7765,14 @@ ...@@ -7735,14 +7765,14 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
50, 100,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
1, 1.5,
1, 1.5,
1 1
] ]
}, },
...@@ -7764,7 +7794,7 @@ ...@@ -7764,7 +7794,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 153 "__id__": 154
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -7796,7 +7826,7 @@ ...@@ -7796,7 +7826,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 153 "__id__": 154
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -7864,7 +7894,7 @@ ...@@ -7864,7 +7894,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 144 "__id__": 145
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -7895,16 +7925,16 @@ ...@@ -7895,16 +7925,16 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 158 "__id__": 159
}, },
{ {
"__id__": 162 "__id__": 163
} }
], ],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 164 "__id__": 165
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -7960,23 +7990,23 @@ ...@@ -7960,23 +7990,23 @@
"_name": "New Sprite(Splash)", "_name": "New Sprite(Splash)",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 157 "__id__": 158
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 159
},
{ {
"__id__": 160 "__id__": 160
}, },
{ {
"__id__": 161 "__id__": 161
},
{
"__id__": 162
} }
], ],
"_prefab": null, "_prefab": null,
"_opacity": 200, "_opacity": 110,
"_color": { "_color": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 0, "r": 0,
...@@ -8028,7 +8058,7 @@ ...@@ -8028,7 +8058,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 158 "__id__": 159
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -8060,7 +8090,7 @@ ...@@ -8060,7 +8090,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 158 "__id__": 159
}, },
"_enabled": true, "_enabled": true,
"_normalMaterial": null, "_normalMaterial": null,
...@@ -8128,7 +8158,7 @@ ...@@ -8128,7 +8158,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 158 "__id__": 159
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -8155,13 +8185,13 @@ ...@@ -8155,13 +8185,13 @@
"_name": "start_ske", "_name": "start_ske",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 157 "__id__": 158
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 163 "__id__": 164
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -8194,8 +8224,8 @@ ...@@ -8194,8 +8224,8 @@
0, 0,
0, 0,
1, 1,
0.3, 1,
0.3, 1,
1 1
] ]
}, },
...@@ -8217,7 +8247,7 @@ ...@@ -8217,7 +8247,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 162 "__id__": 163
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -8253,7 +8283,7 @@ ...@@ -8253,7 +8283,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 157 "__id__": 158
}, },
"_enabled": true, "_enabled": true,
"alignMode": 1, "alignMode": 1,
...@@ -8334,10 +8364,10 @@ ...@@ -8334,10 +8364,10 @@
"__id__": 96 "__id__": 96
}, },
"layout_start": { "layout_start": {
"__id__": 157 "__id__": 158
}, },
"layout_finish": { "layout_finish": {
"__id__": 144 "__id__": 145
}, },
"layout_card": { "layout_card": {
"__id__": 33 "__id__": 33
......
...@@ -2,7 +2,6 @@ import { asyncDelay, onHomeworkFinish, RandomInt } from "../script/util"; ...@@ -2,7 +2,6 @@ import { asyncDelay, onHomeworkFinish, RandomInt } from "../script/util";
import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent"; import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent";
import Game, { FISH_OUT, GAME_STATE, Option } from "./tool/Game"; import Game, { FISH_OUT, GAME_STATE, Option } from "./tool/Game";
import pg from "./tool/pg"; import pg from "./tool/pg";
import { count } from "console";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -125,7 +124,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -125,7 +124,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
private onAgain() { private onAgain() {
this.layout_finish.active = false; this.layout_finish.active = false;
this.onLoadEnd(); this.initData();
pg.event.emit("mouse_num", Game.getIns().getCardInfo().length);
this.gameStart();
} }
private onNext() { private onNext() {
...@@ -182,11 +183,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -182,11 +183,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
private chipPos = []; private chipPos = [];
private showQuestion() { private showQuestion() {
this.chipPos = [ this.chipPos = [
{ x: -260, y: -44, angle: 130 }, { x: -190, y: -24, angle: 130 }, { x: 17, y: 104, angle: 120 }, { x: -260, y: -44, angle: 130, zIndex: 0 }, { x: 245, y: -18, angle: 55, zIndex: 8 }, { x: -190, y: -24, angle: 130, zIndex: 1 },
{ x: 35, y: 39, angle: 65 }, { x: -172, y: 43, angle: 130 }, { x: -64, y: -6, angle: 130 }, { x: 190, y: -15, angle: 60, zIndex: 9 }, { x: -172, y: 43, angle: 130, zIndex: 4 }, { x: 130, y: -18, angle: 65, zIndex: 10 },
{ x: 208, y: 112, angle: 50 }, { x: -26, y: 28, angle: 120 }, { x: 245, y: -18, angle: 55 }, { x: -64, y: -6, angle: 130, zIndex: 5 }, { x: -26, y: 28, angle: 120, zIndex: 7 }, { x: 112, y: 83, angle: 65, zIndex: 11 },
{ x: 190, y: -15, angle: 60 }, { x: 130, y: -18, angle: 65 }, { x: 112, y: 83, angle: 65 } { x: 35, y: 39, angle: 65, zIndex: 3 }, { x: 17, y: 104, angle: 120, zIndex: 2 }, { x: 208, y: 112, angle: 50, zIndex: 6 }
]; ];
// this.chipPos = [
// { x: -260, y: -44, angle: 130 }, { x: -190, y: -24, angle: 130 }, { x: 17, y: 104, angle: 120 },
// { x: 35, y: 39, angle: 65 }, { x: -172, y: 43, angle: 130 }, { x: -64, y: -6, angle: 130 },
// { x: 208, y: 112, angle: 50 }, { x: -26, y: 28, angle: 120 }, { x: 245, y: -18, angle: 55 },
// { x: 190, y: -15, angle: 60 }, { x: 130, y: -18, angle: 65 }, { x: 112, y: 83, angle: 65 }
// ];
this.layout_card.removeAllChildren(); this.layout_card.removeAllChildren();
let chipNode = cc.find("chips", this.layout_game); let chipNode = cc.find("chips", this.layout_game);
this.wordItams = []; this.wordItams = [];
...@@ -197,11 +204,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -197,11 +204,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
let word = cc.find("word", chip); let word = cc.find("word", chip);
word.getComponent(cc.Label).string = ch.txt; word.getComponent(cc.Label).string = ch.txt;
chip.data = ch; chip.data = ch;
chip.data.zIndex = idx; chip.data.zIndex = this.chipPos[idx].zIndex;
chip.x = this.chipPos[idx].x; chip.x = this.chipPos[idx].x;
chip.y = this.chipPos[idx].y; chip.y = this.chipPos[idx].y;
chip.angle = this.chipPos[idx].angle; chip.angle = this.chipPos[idx].angle;
this.layout_card.addChild(chip, idx); this.layout_card.addChild(chip, this.chipPos[idx].zIndex);
chip.off(cc.Node.EventType.TOUCH_START, this.onItemTouchStart, this); chip.off(cc.Node.EventType.TOUCH_START, this.onItemTouchStart, this);
chip.off(cc.Node.EventType.TOUCH_MOVE, this.onItemTouchMove, this); chip.off(cc.Node.EventType.TOUCH_MOVE, this.onItemTouchMove, this);
...@@ -260,10 +267,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -260,10 +267,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!itemBg) { if (!itemBg) {
target.parent = null; target.parent = null;
this.layout_card.addChild(target, data.zIndex); let chipPos = this.getChipPos(data.zIndex)
target.x = this.chipPos[data.zIndex].x; this.layout_card.addChild(target, chipPos.zIndex);
target.y = this.chipPos[data.zIndex].y; target.x = chipPos.x;
target.angle = this.chipPos[data.zIndex].angle; target.y = chipPos.y;
target.angle = chipPos.angle;
this.playLocalAudio("error"); this.playLocalAudio("error");
return; return;
} }
...@@ -291,6 +299,15 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -291,6 +299,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
e.target.setPosition(pos) e.target.setPosition(pos)
} }
} }
private getChipPos(zIndex) {
for (let i = 0; i < this.chipPos.length; i++) {
let chip = this.chipPos[i];
if (chip.zIndex == zIndex) {
return chip;
}
}
return null;
}
private getDistances(p1, p2) { private getDistances(p1, p2) {
//转换世界坐标查看距离 //转换世界坐标查看距离
let ps2 = p2.convertToWorldSpaceAR(cc.v2(0, 0)); let ps2 = p2.convertToWorldSpaceAR(cc.v2(0, 0));
...@@ -335,6 +352,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -335,6 +352,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
let finish_db = cc.find("finish_db", layout_finish); let finish_db = cc.find("finish_db", layout_finish);
let btn_again = cc.find("btn_again", layout_finish); let btn_again = cc.find("btn_again", layout_finish);
let btn_next = cc.find("btn_next", layout_finish); let btn_next = cc.find("btn_next", layout_finish);
finish_db.active = true;
btn_again.active = false;
btn_next.active = false;
finish_db.getComponent(dragonBones.ArmatureDisplay).playAnimation("newAnimation", 1);
this.playLocalAudio("finish").then(() => { this.playLocalAudio("finish").then(() => {
finish_db.active = false; finish_db.active = false;
btn_again.active = true; btn_again.active = true;
......
...@@ -93,6 +93,7 @@ export default class NewClass extends cc.Component { ...@@ -93,6 +93,7 @@ export default class NewClass extends cc.Component {
this.bigStarArr.push(starBg); this.bigStarArr.push(starBg);
} }
this.bigStarArr = this.bigStarArr.reverse();
console.log("bigStarArr: ", this.bigStarArr); console.log("bigStarArr: ", this.bigStarArr);
} }
......
export const defaultData ={ export const defaultData ={
"imgAni": { "imgAni": {
"ske": { "ske": {
"url": "http://staging-teach.cdn.ireadabc.com/62eb732be39e0a514dcd61b2f215141c.json", "url": "http://staging-teach.cdn.ireadabc.com/a7dc36aa85121807bb7e049642192cec.json",
"name": "niao_ske.json" "name": "niao_ske.json"
}, },
"tex": { "tex": {
"url": "http://staging-teach.cdn.ireadabc.com/9e789079ec5355fb1ee28e362e9cb92d.json", "url": "http://staging-teach.cdn.ireadabc.com/c635daaa86b4c5c39f4af88e826d3433.json",
"name": "niao_tex.json" "name": "niao_tex.json"
}, },
"png": { "png": {
"url": "http://staging-teach.cdn.ireadabc.com/609b0aba832294d17fafdb7587773bc3.png", "url": "http://staging-teach.cdn.ireadabc.com/75c87beb2b7d79033ace8978edc91a12.png",
"name": "niao_tex.png" "name": "niao_tex.png"
} }
}, },
"questionTextAudio": "http://staging-teach.cdn.ireadabc.com/c3b69ad3d51385eac7d4195773ef59f7_l.mp3", "questionTextAudio": "http://staging-teach.cdn.ireadabc.com/c3b69ad3d51385eac7d4195773ef59f7_l.mp3",
......
{
"ver": "2.3.5",
"uuid": "c049810d-17a6-4f9e-b81d-1aef551c9dfd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 150,
"height": 150,
"platformSettings": {},
"subMetas": {
"icon_right2": {
"ver": "1.0.4",
"uuid": "7d20a4d1-bc99-4d20-a15a-38163399246d",
"rawTextureUuid": "c049810d-17a6-4f9e-b81d-1aef551c9dfd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 13,
"trimY": 0,
"width": 124,
"height": 150,
"rawWidth": 150,
"rawHeight": 150,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -4588,6 +4588,8 @@ declare namespace cc { ...@@ -4588,6 +4588,8 @@ declare namespace cc {
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space. /** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */ !#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
forward: Vec3; forward: Vec3;
pageIdx: any;
data: any;
/** /**
@param name name @param name name
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