Commit dc66bee6 authored by Tt's avatar Tt

1

parent aefc4824
...@@ -87,16 +87,13 @@ ...@@ -87,16 +87,13 @@
"__id__": 14 "__id__": 14
}, },
{ {
"__id__": 34 "__id__": 33
}, },
{ {
"__id__": 45 "__id__": 45
}, },
{ {
"__id__": 60 "__id__": 61
},
{
"__id__": 79
}, },
{ {
"__id__": 80 "__id__": 80
...@@ -111,22 +108,25 @@ ...@@ -111,22 +108,25 @@
"__id__": 83 "__id__": 83
}, },
{ {
"__id__": 92 "__id__": 84
}, },
{ {
"__id__": 101 "__id__": 93
},
{
"__id__": 102
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{
"__id__": 109
},
{ {
"__id__": 110 "__id__": 110
}, },
{ {
"__id__": 111 "__id__": 111
},
{
"__id__": 112
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -703,11 +703,7 @@ ...@@ -703,11 +703,7 @@
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [],
{
"__id__": 33
}
],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -731,8 +727,8 @@ ...@@ -731,8 +727,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
48.822, 0,
-93.308, 0,
0, 0,
0, 0,
0, 0,
...@@ -754,7 +750,7 @@ ...@@ -754,7 +750,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "dfP1UMDp5AqbDgr/CRwEH1" "_id": "acTU4Z9KJJPp68HingcsiN"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
...@@ -793,8 +789,8 @@ ...@@ -793,8 +789,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 48.822,
0, -93.308,
0, 0,
0, 0,
0, 0,
...@@ -891,8 +887,8 @@ ...@@ -891,8 +887,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-48.564, 0.258,
446.901, 353.593,
0, 0,
0, 0,
0, 0,
...@@ -1093,8 +1089,8 @@ ...@@ -1093,8 +1089,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-113.926, -65.104,
-23.515, -116.823,
0, 0,
0, 0,
0, 0,
...@@ -1560,8 +1556,8 @@ ...@@ -1560,8 +1556,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
2.854, 51.676,
153.49, 60.182,
0, 0,
0, 0,
0, 0,
...@@ -1617,38 +1613,6 @@ ...@@ -1617,38 +1613,6 @@
"_atlas": null, "_atlas": null,
"_id": "2cabou0atFVq7H20yLluzG" "_id": "2cabou0atFVq7H20yLluzG"
}, },
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c7c275d7-232e-432e-8db0-33b1d46170d9"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9auvWckQ1HP5ckQ83QfE7j"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "item_vegetables", "_name": "item_vegetables",
...@@ -1658,13 +1622,10 @@ ...@@ -1658,13 +1622,10 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 35 "__id__": 34
},
{
"__id__": 37
}, },
{ {
"__id__": 43 "__id__": 36
} }
], ],
"_active": true, "_active": true,
...@@ -1722,13 +1683,13 @@ ...@@ -1722,13 +1683,13 @@
"_name": "bg_vegetables", "_name": "bg_vegetables",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 33
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 36 "__id__": 35
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -1784,7 +1745,7 @@ ...@@ -1784,7 +1745,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 35 "__id__": 34
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -1811,12 +1772,77 @@ ...@@ -1811,12 +1772,77 @@
"_atlas": null, "_atlas": null,
"_id": "d5PX/HXrJDsIueQM9fImd2" "_id": "d5PX/HXrJDsIueQM9fImd2"
}, },
{
"__type__": "cc.Node",
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 33
},
"_children": [
{
"__id__": 37
},
{
"__id__": 43
}
],
"_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": "c51wYk90tJ8q0YBmT/Gh7S"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 36
}, },
"_children": [ "_children": [
{ {
...@@ -1941,7 +1967,7 @@ ...@@ -1941,7 +1967,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "078Livaq1K7YvWrHDlhn2g" "_id": "f7SGFaXOhMqZaA7rmaqqRR"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -1974,7 +2000,7 @@ ...@@ -1974,7 +2000,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "c4eAUnOIVJOJQbNBaCIQJr" "_id": "bckTYkhUtHKLOMs3FC3Qqc"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2037,7 +2063,7 @@ ...@@ -2037,7 +2063,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "49s5P8NjhKypw5sYK3fpka" "_id": "e9h5iha/9BjqIeYLjdcCZm"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2070,7 +2096,7 @@ ...@@ -2070,7 +2096,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "edXP76nntCD71XGw8ErRk3" "_id": "89VfU/L69Ag4Kakgk2heiO"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -2098,7 +2124,7 @@ ...@@ -2098,7 +2124,7 @@
"_name": "img", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 34 "__id__": 36
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -2200,9 +2226,6 @@ ...@@ -2200,9 +2226,6 @@
}, },
{ {
"__id__": 48 "__id__": 48
},
{
"__id__": 50
} }
], ],
"_active": true, "_active": true,
...@@ -2351,16 +2374,81 @@ ...@@ -2351,16 +2374,81 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "img", "_name": "content",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 45
}, },
"_children": [
{
"__id__": 49
},
{
"__id__": 51
}
],
"_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": "6636by2a5NyaAn1SYPEEpA"
},
{
"__type__": "cc.Node",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 48
},
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 49 "__id__": 50
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2416,7 +2504,7 @@ ...@@ -2416,7 +2504,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 48 "__id__": 49
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2448,26 +2536,26 @@ ...@@ -2448,26 +2536,26 @@
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 45 "__id__": 48
}, },
"_children": [ "_children": [
{ {
"__id__": 51 "__id__": 52
}, },
{ {
"__id__": 53 "__id__": 54
}, },
{ {
"__id__": 55 "__id__": 56
}, },
{ {
"__id__": 57 "__id__": 58
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 59 "__id__": 60
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2523,13 +2611,13 @@ ...@@ -2523,13 +2611,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 50 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 52 "__id__": 53
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2579,14 +2667,14 @@ ...@@ -2579,14 +2667,14 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "aeg3iujAND0b5MKjNP4NNG" "_id": "3eHv1Yc2hJqI+t8fWlTq/W"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 51 "__id__": 52
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2612,20 +2700,20 @@ ...@@ -2612,20 +2700,20 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "8aoQ4I9ytCJp4owAgUSXpg" "_id": "6eoo64daJPqrKTnsjDkrAT"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 50 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 54 "__id__": 55
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2675,14 +2763,14 @@ ...@@ -2675,14 +2763,14 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "a3d7PXnRpLsbM2LMWI0QtU" "_id": "1a0B7p3MFLYK6WpynZmzsm"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 53 "__id__": 54
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2708,20 +2796,20 @@ ...@@ -2708,20 +2796,20 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "50lq7yZ0ZGxq44pU0Z7DGM" "_id": "22ZvtZL1JOtr+T8wMkbjEd"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 50 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 56 "__id__": 57
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2771,14 +2859,14 @@ ...@@ -2771,14 +2859,14 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "1243ke+XNGJo61PXMndjbX" "_id": "c8rzlpXZpLAa+Pue9WTnkH"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 55 "__id__": 56
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2804,20 +2892,20 @@ ...@@ -2804,20 +2892,20 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "1fYwHVPY1Hjb9NYddLWFSg" "_id": "10NKpIHm9NXLVi5q/1w/PB"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 50 "__id__": 51
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 58 "__id__": 59
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -2867,14 +2955,14 @@ ...@@ -2867,14 +2955,14 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "588ZZbGwBJ5J6xAk/q9bdy" "_id": "294GdOAyhKg6mvsHcngFqM"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 57 "__id__": 58
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -2900,14 +2988,14 @@ ...@@ -2900,14 +2988,14 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "4cRuaTqYRFwLL1tUzXsIbJ" "_id": "3bYq5lfx1DtI0+wx3/O7Wr"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 50 "__id__": 51
}, },
"_enabled": true, "_enabled": true,
"_fontFamily": "Arial", "_fontFamily": "Arial",
...@@ -2932,16 +3020,16 @@ ...@@ -2932,16 +3020,16 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 61 "__id__": 62
}, },
{ {
"__id__": 63 "__id__": 64
}, },
{ {
"__id__": 75 "__id__": 76
}, },
{ {
"__id__": 77 "__id__": 78
} }
], ],
"_active": false, "_active": false,
...@@ -2999,13 +3087,13 @@ ...@@ -2999,13 +3087,13 @@
"_name": "bg_pie", "_name": "bg_pie",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 60 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 62 "__id__": 63
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3061,7 +3149,7 @@ ...@@ -3061,7 +3149,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 61 "__id__": 62
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3093,29 +3181,29 @@ ...@@ -3093,29 +3181,29 @@
"_name": "text", "_name": "text",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 60 "__id__": 61
}, },
"_children": [ "_children": [
{ {
"__id__": 64 "__id__": 65
}, },
{ {
"__id__": 66 "__id__": 67
}, },
{ {
"__id__": 68 "__id__": 69
}, },
{ {
"__id__": 70 "__id__": 71
}, },
{ {
"__id__": 72 "__id__": 73
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 74 "__id__": 75
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3171,13 +3259,13 @@ ...@@ -3171,13 +3259,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 63 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 65 "__id__": 66
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3234,7 +3322,7 @@ ...@@ -3234,7 +3322,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 64 "__id__": 65
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3267,13 +3355,13 @@ ...@@ -3267,13 +3355,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 63 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 67 "__id__": 68
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3330,7 +3418,7 @@ ...@@ -3330,7 +3418,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 66 "__id__": 67
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3363,13 +3451,13 @@ ...@@ -3363,13 +3451,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 63 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 69 "__id__": 70
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3426,7 +3514,7 @@ ...@@ -3426,7 +3514,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 68 "__id__": 69
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3459,13 +3547,13 @@ ...@@ -3459,13 +3547,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 63 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 71 "__id__": 72
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3522,7 +3610,7 @@ ...@@ -3522,7 +3610,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 70 "__id__": 71
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3555,13 +3643,13 @@ ...@@ -3555,13 +3643,13 @@
"_name": "RICHTEXT_CHILD", "_name": "RICHTEXT_CHILD",
"_objFlags": 1024, "_objFlags": 1024,
"_parent": { "_parent": {
"__id__": 63 "__id__": 64
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 73 "__id__": 74
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3618,7 +3706,7 @@ ...@@ -3618,7 +3706,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 72 "__id__": 73
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3651,7 +3739,7 @@ ...@@ -3651,7 +3739,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 63 "__id__": 64
}, },
"_enabled": true, "_enabled": true,
"_fontFamily": "Arial", "_fontFamily": "Arial",
...@@ -3672,13 +3760,13 @@ ...@@ -3672,13 +3760,13 @@
"_name": "img", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 60 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 76 "__id__": 77
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3734,7 +3822,7 @@ ...@@ -3734,7 +3822,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 75 "__id__": 76
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -3766,13 +3854,13 @@ ...@@ -3766,13 +3854,13 @@
"_name": "ani", "_name": "ani",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 60 "__id__": 61
}, },
"_children": [], "_children": [],
"_active": false, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 78 "__id__": 79
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3798,7 +3886,7 @@ ...@@ -3798,7 +3886,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, -49.653,
0, 0,
0, 0,
0, 0,
...@@ -3828,7 +3916,7 @@ ...@@ -3828,7 +3916,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 77 "__id__": 78
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4104,10 +4192,10 @@ ...@@ -4104,10 +4192,10 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 84 "__id__": 85
}, },
{ {
"__id__": 88 "__id__": 89
} }
], ],
"_active": true, "_active": true,
...@@ -4165,17 +4253,17 @@ ...@@ -4165,17 +4253,17 @@
"_name": "line_right", "_name": "line_right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 83 "__id__": 84
}, },
"_children": [ "_children": [
{ {
"__id__": 85 "__id__": 86
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 87 "__id__": 88
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4231,13 +4319,13 @@ ...@@ -4231,13 +4319,13 @@
"_name": "finger", "_name": "finger",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 84 "__id__": 85
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 86 "__id__": 87
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4293,7 +4381,7 @@ ...@@ -4293,7 +4381,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 85 "__id__": 86
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4325,7 +4413,7 @@ ...@@ -4325,7 +4413,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 84 "__id__": 85
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4357,17 +4445,17 @@ ...@@ -4357,17 +4445,17 @@
"_name": "line_left", "_name": "line_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 83 "__id__": 84
}, },
"_children": [ "_children": [
{ {
"__id__": 89 "__id__": 90
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 91 "__id__": 92
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4423,13 +4511,13 @@ ...@@ -4423,13 +4511,13 @@
"_name": "finger", "_name": "finger",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 88 "__id__": 89
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 90 "__id__": 91
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4485,7 +4573,7 @@ ...@@ -4485,7 +4573,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 89 "__id__": 90
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4517,7 +4605,7 @@ ...@@ -4517,7 +4605,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 88 "__id__": 89
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4553,16 +4641,16 @@ ...@@ -4553,16 +4641,16 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 93 "__id__": 94
}, },
{ {
"__id__": 95 "__id__": 96
}, },
{ {
"__id__": 97 "__id__": 98
}, },
{ {
"__id__": 99 "__id__": 100
} }
], ],
"_active": true, "_active": true,
...@@ -4620,13 +4708,13 @@ ...@@ -4620,13 +4708,13 @@
"_name": "img_left", "_name": "img_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 92 "__id__": 93
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 94 "__id__": 95
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4682,7 +4770,7 @@ ...@@ -4682,7 +4770,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 93 "__id__": 94
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4714,13 +4802,13 @@ ...@@ -4714,13 +4802,13 @@
"_name": "btn_left", "_name": "btn_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 92 "__id__": 93
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 96 "__id__": 97
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4776,7 +4864,7 @@ ...@@ -4776,7 +4864,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 95 "__id__": 96
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4808,13 +4896,13 @@ ...@@ -4808,13 +4896,13 @@
"_name": "btn_right", "_name": "btn_right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 92 "__id__": 93
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 98 "__id__": 99
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4870,7 +4958,7 @@ ...@@ -4870,7 +4958,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 97 "__id__": 98
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -4902,13 +4990,13 @@ ...@@ -4902,13 +4990,13 @@
"_name": "img_right", "_name": "img_right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 92 "__id__": 93
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 100 "__id__": 101
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -4964,7 +5052,7 @@ ...@@ -4964,7 +5052,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 99 "__id__": 100
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5000,13 +5088,13 @@ ...@@ -5000,13 +5088,13 @@
}, },
"_children": [ "_children": [
{ {
"__id__": 102 "__id__": 103
}, },
{ {
"__id__": 105 "__id__": 106
}, },
{ {
"__id__": 106 "__id__": 107
} }
], ],
"_active": true, "_active": true,
...@@ -5064,11 +5152,11 @@ ...@@ -5064,11 +5152,11 @@
"_name": "font", "_name": "font",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 101 "__id__": 102
}, },
"_children": [ "_children": [
{ {
"__id__": 103 "__id__": 104
} }
], ],
"_active": true, "_active": true,
...@@ -5126,13 +5214,13 @@ ...@@ -5126,13 +5214,13 @@
"_name": "BRLNSDB", "_name": "BRLNSDB",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 102 "__id__": 103
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 104 "__id__": 105
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5188,7 +5276,7 @@ ...@@ -5188,7 +5276,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 103 "__id__": 104
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -5223,7 +5311,7 @@ ...@@ -5223,7 +5311,7 @@
"_name": "img", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 101 "__id__": 102
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -5281,11 +5369,11 @@ ...@@ -5281,11 +5369,11 @@
"_name": "audio", "_name": "audio",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 101 "__id__": 102
}, },
"_children": [ "_children": [
{ {
"__id__": 107 "__id__": 108
} }
], ],
"_active": true, "_active": true,
...@@ -5343,13 +5431,13 @@ ...@@ -5343,13 +5431,13 @@
"_name": "btn", "_name": "btn",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 106 "__id__": 107
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 108 "__id__": 109
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -5405,7 +5493,7 @@ ...@@ -5405,7 +5493,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 107 "__id__": 108
}, },
"_enabled": true, "_enabled": true,
"_clip": { "_clip": {
...@@ -5475,25 +5563,25 @@ ...@@ -5475,25 +5563,25 @@
"__id__": 14 "__id__": 14
}, },
"item_vegetables": { "item_vegetables": {
"__id__": 34 "__id__": 33
}, },
"item_meat": { "item_meat": {
"__id__": 45 "__id__": 45
}, },
"item_pie": { "item_pie": {
"__id__": 60 "__id__": 61
}, },
"layout_main": { "layout_main": {
"__id__": 79 "__id__": 80
}, },
"layout_vegetables": { "layout_vegetables": {
"__id__": 80 "__id__": 81
}, },
"layout_meat": { "layout_meat": {
"__id__": 81 "__id__": 82
}, },
"layout_pie": { "layout_pie": {
"__id__": 82 "__id__": 83
}, },
"_id": "eaTVUpqahPfZeO9+sUI7RP" "_id": "eaTVUpqahPfZeO9+sUI7RP"
} }
......
...@@ -97,8 +97,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -97,8 +97,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.vegetableNodes = []; this.vegetableNodes = [];
// 肉饼区域初始化 // 肉饼区域初始化
this.initLayoutMeet(); this.initLayoutMeet();
this.visibleMeetList();
// 蔬菜部分初始化 // 蔬菜部分初始化
this.initLayoutVegetable(); this.initLayoutVegetable();
this.visibleVegetableList();
// 开始第一题(中间初始化) // 开始第一题(中间初始化)
this.initLayoutMain(); this.initLayoutMain();
// 初始化引导 // 初始化引导
...@@ -116,24 +118,34 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -116,24 +118,34 @@ export default class SceneComponent extends MyCocosSceneComponent {
initLayoutMeet() { initLayoutMeet() {
// 计算肉饼总数量 // 计算肉饼总数量
this.questions.concat([]).reverse().forEach((question, i) => { this.questions.concat([]).reverse().forEach((question, i) => {
// 创建节点 this.createMeet(question, i)
let node = pg.view.clone(this.item_meat); })
this.layout_meat.addChild(node) }
// 刷新节点 createMeet(question, i) {
this.updateItemMeet(node, question); // 创建节点
// 设定坐标 let node = pg.view.clone(this.item_meat);
let pos = this.getMeetPosByI(i); this.layout_meat.addChild(node)
node.x = pos.x // 刷新节点
node.y = pos.y this.updateItemMeet(node, question);
// 放入数组中便于引用 // 设定坐标
this.meetNodes.push(node); let pos = this.getMeetPosByI(i);
node.x = pos.x
node.y = pos.y
// 放入数组中便于引用
this.meetNodes.push(node);
return node;
}
visibleMeetList() {
this.meetNodes.forEach((item, i) => {
let content = pg.view.find(item, 'content');
content.active = (this.questions.length - i - 1) === this.current
}) })
} }
// 左侧图片/文字 文字有多色高亮 文字默认颜色和高亮颜色都是不同的。 // 左侧图片/文字 文字有多色高亮 文字默认颜色和高亮颜色都是不同的。
updateItemMeet(item, data) { updateItemMeet(item, data) {
item.data = data; item.data = data;
item.active = true; item.active = true;
let img = pg.view.find(item, 'img'); let img = pg.view.find(item, 'content/img');
if (data.meetType.indexOf('img') > -1) { if (data.meetType.indexOf('img') > -1) {
img.active = true; img.active = true;
pg.view.setNetImg(img, data.meetImage, { w: 330, h: 200 }) pg.view.setNetImg(img, data.meetImage, { w: 330, h: 200 })
...@@ -141,7 +153,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -141,7 +153,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
img.active = false; img.active = false;
} }
let text = pg.view.find(item, 'text'); let text = pg.view.find(item, 'content/text');
if (data.meetType.indexOf('text') > -1) { if (data.meetType.indexOf('text') > -1) {
text.active = true; text.active = true;
let str = this.getText(data.meetTextArr, `#F7D63A`, `#FFFFFF`); let str = this.getText(data.meetTextArr, `#F7D63A`, `#FFFFFF`);
...@@ -156,19 +168,23 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -156,19 +168,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
item.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchMeetEnd, this); item.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchMeetEnd, this);
} }
getMeetPosByI(i) { getMeetPosByI(i) {
let pos = cc.v2(SceneComponent.meetDefaultPos) let pos = cc.v2(SceneComponent.meetDefaultPos)
pos.y += i * SceneComponent.meetSpace.y; pos.y += i * SceneComponent.meetSpace.y;
return pos; return pos;
} }
meetCurrentNode: cc.Node; get meetCurrentNode() {
return this.meetNodes[this.questions.length - 1 - this.current]
}
meetCurrentTouchNode: cc.Node;
onTouchMeetStart(event) { onTouchMeetStart(event) {
if (this.guide == 1) return; if (this.guide == 1) return;
let node = event.target; let node = event.target;
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
this.meetCurrentNode = node; this.meetCurrentTouchNode = node;
node.cPos = cc.v2(node); node.cPos = cc.v2(node);
} }
onTouchMeetMove(event) { onTouchMeetMove(event) {
...@@ -178,7 +194,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -178,7 +194,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.meetCurrentNode) return; if (node != this.meetCurrentTouchNode) return;
node.opacity = 255; node.opacity = 255;
let delta = event.touch.getDelta(); let delta = event.touch.getDelta();
let pos = cc.v2(delta); let pos = cc.v2(delta);
...@@ -191,7 +207,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -191,7 +207,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.meetCurrentNode) return; if (node != this.meetCurrentTouchNode) return;
this.hideGuide(); this.hideGuide();
let x = node.x; let x = node.x;
let y = node.y; let y = node.y;
...@@ -205,16 +221,20 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -205,16 +221,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
onMeetSuccess(node) { onMeetSuccess(node) {
if (this.guide == 0) this.guide = 1; if (this.guide == 0) {
this.guide = 1;
this.showGuide();
}
node.scale = 1.4; node.scale = 1.4;
node.x = this.successPos.x; node.x = this.successPos.x;
node.y = this.successPos.y; node.y = this.successPos.y;
this.meetCurrentNode = null; this.meetCurrentTouchNode = null;
node.off(cc.Node.EventType.TOUCH_START, this.onTouchMeetStart, this); node.off(cc.Node.EventType.TOUCH_START, this.onTouchMeetStart, this);
node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMeetMove, this); node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchMeetMove, this);
node.off(cc.Node.EventType.TOUCH_END, this.onTouchMeetEnd, this); node.off(cc.Node.EventType.TOUCH_END, this.onTouchMeetEnd, this);
node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchMeetEnd, this); node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchMeetEnd, this);
node.parent = this.layout_main; node.parent = this.currentMain;
this.meetNodes.pop();
this.successArr.push(node); this.successArr.push(node);
if (this.successArr.length == 2) { if (this.successArr.length == 2) {
this.showPie(); this.showPie();
...@@ -223,7 +243,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -223,7 +243,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
onMeetFail(node) { onMeetFail(node) {
node.x = node.cPos.x; node.x = node.cPos.x;
node.y = node.cPos.y; node.y = node.cPos.y;
this.meetCurrentNode = null; this.meetCurrentTouchNode = null;
} }
//-------------------------------蔬菜区域--------------------------------- //-------------------------------蔬菜区域---------------------------------
static vegetableDefaultPos: cc.Vec2 = cc.v2(660, 294); static vegetableDefaultPos: cc.Vec2 = cc.v2(660, 294);
...@@ -232,26 +252,35 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -232,26 +252,35 @@ export default class SceneComponent extends MyCocosSceneComponent {
initLayoutVegetable() { initLayoutVegetable() {
// 计算肉饼总数量 // 计算肉饼总数量
this.questions.concat([]).reverse().forEach((question, i) => { this.questions.concat([]).reverse().forEach((question, i) => {
// 创建节点 this.createVegetable(question, i);
let node = pg.view.clone(this.item_vegetables); })
this.layout_vegetables.addChild(node) }
// 刷新节点 createVegetable(question, i) {
this.updateItemVegetable(node, question); // 创建节点
// 设定坐标 let node = pg.view.clone(this.item_vegetables);
node.x = SceneComponent.vegetableDefaultPos.x this.layout_vegetables.addChild(node)
node.y = SceneComponent.vegetableDefaultPos.y // 刷新节点
// 设定旋转 this.updateItemVegetable(node, question);
node.angle = this.getVegetableAngleByI(i) // 设定坐标
// 放入数组中便于引用 node.x = SceneComponent.vegetableDefaultPos.x
this.vegetableNodes.push(node); node.y = SceneComponent.vegetableDefaultPos.y
// 设定旋转
node.angle = this.getVegetableAngleByI(i)
// 放入数组中便于引用
this.vegetableNodes.push(node);
return node;
}
visibleVegetableList() {
this.vegetableNodes.forEach((item, i) => {
let content = pg.view.find(item, 'content');
content.active = (this.questions.length - i - 1) === this.current
}) })
} }
// 右侧文字高亮 右上角菜叶子我给了一个,但是你展示在右上角时,每一片都需要有5-10度的转动。 // 右侧文字高亮 右上角菜叶子我给了一个,但是你展示在右上角时,每一片都需要有5-10度的转动。
updateItemVegetable(item, data) { updateItemVegetable(item, data) {
item.data = data; item.data = data;
item.active = true; item.active = true;
let img = pg.view.find(item, 'img'); let img = pg.view.find(item, 'content/img');
if (data.vegetableType.indexOf('img') > -1) { if (data.vegetableType.indexOf('img') > -1) {
img.active = true; img.active = true;
pg.view.setNetImg(img, data.vegetableImage, { w: 350, h: 220 }) pg.view.setNetImg(img, data.vegetableImage, { w: 350, h: 220 })
...@@ -259,7 +288,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -259,7 +288,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
img.active = false; img.active = false;
} }
let text = pg.view.find(item, 'text'); let text = pg.view.find(item, 'content/text');
if (data.vegetableType.indexOf('text') > -1) { if (data.vegetableType.indexOf('text') > -1) {
text.active = true; text.active = true;
let str = this.getText(data.vegetableTextArr, `#00580A`, `#3E8E2C`); let str = this.getText(data.vegetableTextArr, `#00580A`, `#3E8E2C`);
...@@ -279,14 +308,17 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -279,14 +308,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
return angle; return angle;
} }
vegetableCurrentNode: cc.Node; get vegetableCurrentNode() {
return this.vegetableNodes[this.questions.length - 1 - this.current]
}
vegetableCurrentTouchNode: cc.Node;
onTouchVegetableStart(event) { onTouchVegetableStart(event) {
if (this.guide == 0) return; if (this.guide == 0) return;
let node = event.target; let node = event.target;
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
this.vegetableCurrentNode = node; this.vegetableCurrentTouchNode = node;
node.cPos = cc.v2(node); node.cPos = cc.v2(node);
} }
onTouchVegetableMove(event) { onTouchVegetableMove(event) {
...@@ -296,7 +328,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -296,7 +328,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.vegetableCurrentNode) return; if (node != this.vegetableCurrentTouchNode) return;
node.opacity = 255; node.opacity = 255;
let delta = event.touch.getDelta(); let delta = event.touch.getDelta();
let pos = cc.v2(delta); let pos = cc.v2(delta);
...@@ -309,7 +341,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -309,7 +341,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node.data) node = node.parent; if (!node.data) node = node.parent;
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.vegetableCurrentNode) return; if (node != this.vegetableCurrentTouchNode) return;
this.hideGuide(); this.hideGuide();
let x = node.x; let x = node.x;
let y = node.y; let y = node.y;
...@@ -327,13 +359,14 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -327,13 +359,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
node.scale = 1.4; node.scale = 1.4;
node.x = this.successPos.x; node.x = this.successPos.x;
node.y = this.successPos.y; node.y = this.successPos.y;
this.vegetableCurrentNode = null; this.vegetableCurrentTouchNode = null;
node.off(cc.Node.EventType.TOUCH_START, this.onTouchVegetableStart, this); node.off(cc.Node.EventType.TOUCH_START, this.onTouchVegetableStart, this);
node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchVegetableMove, this); node.off(cc.Node.EventType.TOUCH_MOVE, this.onTouchVegetableMove, this);
node.off(cc.Node.EventType.TOUCH_END, this.onTouchVegetableEnd, this); node.off(cc.Node.EventType.TOUCH_END, this.onTouchVegetableEnd, this);
node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchVegetableEnd, this); node.off(cc.Node.EventType.TOUCH_CANCEL, this.onTouchVegetableEnd, this);
node.parent = this.layout_main; node.parent = this.currentMain;
this.successArr.push(node); this.successArr.push(node);
this.vegetableNodes.pop();
if (this.successArr.length == 2) { if (this.successArr.length == 2) {
this.showPie(); this.showPie();
} }
...@@ -341,7 +374,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -341,7 +374,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
onVegetableFail(node) { onVegetableFail(node) {
node.x = node.cPos.x; node.x = node.cPos.x;
node.y = node.cPos.y; node.y = node.cPos.y;
this.vegetableCurrentNode = null; this.vegetableCurrentTouchNode = null;
} }
//-------------------------------派区域--------------------------------- //-------------------------------派区域---------------------------------
...@@ -365,6 +398,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -365,6 +398,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let ani = pg.view.find(node, 'ani') let ani = pg.view.find(node, 'ani')
ani.active = true; ani.active = true;
pg.view.playDBAnimation(ani, 'normal', 1) pg.view.playDBAnimation(ani, 'normal', 1)
node.parent = this.currentMain
}) })
.start(); .start();
}, 0.2) }, 0.2)
...@@ -391,16 +425,29 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -391,16 +425,29 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
//-------------------------------中间区域--------------------------------- //-------------------------------中间区域---------------------------------
static mainDefaultPos: cc.Vec2 = cc.v2(48.822, -93.308); static mainDefaultPos: cc.Vec2 = cc.v2(0, 0);
static mainStartPos: cc.Vec2 = cc.v2(48.822, 693.308); static mainStartPos: cc.Vec2 = cc.v2(0, 1000);
private currentMain: cc.Node;
initLayoutMain() { initLayoutMain() {
// init必定是第一个 // init必定是第一个
let node = this.createItemMain(this.currentQuestion);
let node = pg.view.clone(this.item_main);
this.layout_main.addChild(node)
node.x = SceneComponent.mainDefaultPos.x; node.x = SceneComponent.mainDefaultPos.x;
node.y = SceneComponent.mainDefaultPos.y; node.y = SceneComponent.mainDefaultPos.y;
this.updateItemMain(node, this.currentQuestion); this.currentMain = node;
}
nextLayoutMain(data) {
let node = this.createItemMain(data);
node.x = SceneComponent.mainStartPos.x;
node.y = SceneComponent.mainStartPos.y;
cc.tween(node).to(1, { x: SceneComponent.mainDefaultPos.x, y: SceneComponent.mainDefaultPos.y }).start();
return node;
}
createItemMain(data) {
//item_main
let node = pg.view.clone(this.item_main);
this.layout_main.addChild(node)
this.updateItemMain(node, data);
return node;
} }
//标题刷新 标题如果不配置,就不显示那个黄色标题小标签。 三种情况 题干无、题干有、题干图片+文字 文字默认颜色和高亮颜色都是不同的。超框体缩字。 //标题刷新 标题如果不配置,就不显示那个黄色标题小标签。 三种情况 题干无、题干有、题干图片+文字 文字默认颜色和高亮颜色都是不同的。超框体缩字。
updateItemMain(item, data) { updateItemMain(item, data) {
...@@ -445,6 +492,60 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -445,6 +492,60 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
return str; return str;
} }
// ----------------------------------题目切换---------------------------------
// 下一题刷新选项
nextStage() {
this.hideGuide();
// 两边丢弃
this.discardCurrent();
// 中间移出
cc.tween(this.currentMain).by(1, { y: -1800 }).start();
// 中间移入
let node = this.nextLayoutMain(this.nextQuestion);
// 切换题目主体
this.current += 1;
this.successArr = [];
//
this.currentMain = node;
this.visibleMeetList();
this.visibleVegetableList();
this.updateBtns();
}
lastStage() {
this.hideGuide();
// 两边放入
this.createCurrent();
// 中间移出
cc.tween(this.currentMain).by(1, { y: -1800 }).start();
// 中间移入
let node = this.nextLayoutMain(this.preQuestion);
// 切换题目主体
this.current -= 1;
this.successArr = [];
this.updateBtns();
}
discardCurrent() {
if (this.meetCurrentNode) {
this.meetCurrentNode.parent = this.currentMain
}
if (this.vegetableCurrentNode) {
this.vegetableCurrentNode.parent = this.currentMain
}
}
createCurrent() {
// 创建两侧内容
let lastId = this.current - 1;
let questionId = this.questions.length - 1 - lastId;
let meet = this.createMeet(this.preQuestion, questionId)
let tPosMeet = cc.v2(meet);
meet.y += 1000
cc.tween(meet).to(1, { x: tPosMeet.x, y: tPosMeet.y - 30 }).to(0.1, { y: tPosMeet.y }).start()
let vegetable = this.createVegetable(this.preQuestion, questionId)
let tPosVegetable = cc.v2(vegetable);
vegetable.y += 1000
cc.tween(vegetable).to(1, { x: tPosVegetable.x, y: tPosVegetable.y - 30 }).to(0.1, { y: tPosVegetable.y }).start()
}
//-----------------------------------翻页部分------------------------------------ //-----------------------------------翻页部分------------------------------------
updateBtns() { updateBtns() {
let layout_btn = pg.view.find(this, 'layout_btn'); let layout_btn = pg.view.find(this, 'layout_btn');
...@@ -461,11 +562,13 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -461,11 +562,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 用户点击下一页, 面包移出画面。 当不做题的时候点击。面包向下移出,蔬菜和肉饼乡下移动回来。 // 用户点击下一页, 面包移出画面。 当不做题的时候点击。面包向下移出,蔬菜和肉饼乡下移动回来。
onTouchNext() { onTouchNext() {
// 前往下一页
this.nextStage();
} }
// 往前翻,向下移动上面下来一个新的内容。 天上掉落内容。 // 往前翻,向下移动上面下来一个新的内容。 天上掉落内容。
onTouchLast() { onTouchLast() {
//
this.lastStage();
} }
//-----------------------------------引导部分------------------------------------ //-----------------------------------引导部分------------------------------------
...@@ -536,11 +639,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -536,11 +639,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 下一题刷新选项
nextStage() {
}
//小迪右跑左。 抛出画面 //小迪右跑左。 抛出画面
showXiaodi() { showXiaodi() {
...@@ -559,102 +657,4 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -559,102 +657,4 @@ export default class SceneComponent extends MyCocosSceneComponent {
}); });
}) })
} }
} }
/* \ No newline at end of file
let question = {
title: "Countries",
type: "img",
mainType: "empty",
mainText: "this is info",
mainTextArr: [
{
text: "this",
block: true,
check: 1,
},
{
text: "is",
block: false,
check: 1,
},
{
text: "info",
block: false,
check: 1,
},
],
meetType: "img",
meetText: "test info",
meetTextArr: [
{
text: "test",
block: true,
check: 1,
},
{
text: "info",
block: false,
check: 1,
},
],
vegetableType: "text",
pieType: "img_text",
pieText: "Countries have their own flag.",
pieTextArr: [
{
text: "Countries",
block: false,
check: 1,
},
{
text: "have",
block: true,
check: 1,
},
{
text: "their",
block: true,
check: 1,
},
{
text: "own",
block: true,
check: 1,
},
{
text: "flag.",
block: false,
check: 1,
},
],
meetImage: "http://staging-teach.cdn.ireadabc.com/b4494456199505bdf990fff96a0c9fb8.jpg",
vegetableText: "have one's own flag",
vegetableTextArr: [
{
text: "have",
block: false,
check: 1,
},
{
text: "one's",
block: false,
check: 1,
},
{
text: "own",
block: false,
check: 1,
},
{
text: "flag",
block: true,
check: 1,
},
],
pieImage: "http://staging-teach.cdn.ireadabc.com/0205b2ff3fc18a109419aec0c84d5bfe.png",
}
*/
\ No newline at end of file
...@@ -9,20 +9,22 @@ ...@@ -9,20 +9,22 @@
1.标题部分 、大标题 1.标题部分 、大标题
2.左侧图片/文字 文字有多色高亮 肉饼、面包片、菜叶子上面的文字默认颜色和高亮颜色都是不同的。 2.左侧图片/文字 文字有多色高亮 肉饼、面包片、菜叶子上面的文字默认颜色和高亮颜色都是不同的。
3.右侧文字高亮 右上角菜叶子我给了一个,但是你展示在右上角时,每一片都需要有5-10度的转动。 3.右侧文字高亮 右上角菜叶子我给了一个,但是你展示在右上角时,每一片都需要有5-10度的转动。
4.先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。 4.先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。
5.上面掉下来一个面包片 炸星星 上面那个面包片掉下来之后,需要弹起一下再落下。 5.上面掉下来一个面包片 炸星星 上面那个面包片掉下来之后,需要弹起一下再落下。
6.面包片有图片+文字 或 文字 6.面包片有图片+文字 或 文字
7.用户点击下一页, 面包移出画面。 7.用户点击下一页, 面包移出画面。
8.下一题刷新选项 8.下一题刷新选项
9.最多配置5道题 不限制 9.最多配置5道题 不限制
10.小迪右跑左。 抛出画面
11.所有题做完,小迪入场结束 + 退出按钮
12.三种情况 题干无、题干有、题干图片+文字
13.当不做题的时候点击。面包向下移出,蔬菜和肉饼乡下移动回来。 13.当不做题的时候点击。面包向下移出,蔬菜和肉饼乡下移动回来。
14.往前翻,向下移动上面下来一个新的内容。 天上掉落内容。 14.往前翻,向下移动上面下来一个新的内容。 天上掉落内容。
15.停留时间8s以上,手指提示拖拽。 15.停留时间8s以上,手指提示拖拽。
16.超框体缩字。 16.超框体缩字。
17.每一题就一片叶子一片肉饼 12.三种情况 题干无、题干有、题干图片+文字
10.小迪右跑左。 抛出画面
11.所有题做完,小迪入场结束 + 退出按钮
\ 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