Commit 3f8f5b41 authored by Li MingZhe's avatar Li MingZhe

feat: 添加评测功能

parent bb533d70
No preview for this file type
......@@ -17,7 +17,7 @@
"__id__": 2
},
{
"__id__": 91
"__id__": 95
}
],
"_active": false,
......@@ -90,13 +90,13 @@
"_active": true,
"_components": [
{
"__id__": 88
"__id__": 92
},
{
"__id__": 89
"__id__": 93
},
{
"__id__": 90
"__id__": 94
}
],
"_prefab": null,
......@@ -723,13 +723,13 @@
"__id__": 16
},
{
"__id__": 57
"__id__": 59
},
{
"__id__": 62
"__id__": 66
},
{
"__id__": 69
"__id__": 73
}
],
"_active": false,
......@@ -849,6 +849,9 @@
},
{
"__id__": 55
},
{
"__id__": 57
}
],
"_active": true,
......@@ -903,7 +906,7 @@
},
{
"__type__": "cc.Node",
"_name": "bottle_top",
"_name": "bg_speak",
"_objFlags": 0,
"_parent": {
"__id__": 16
......@@ -924,6 +927,96 @@
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 106,
"height": 108
},
"_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": "0dF1g2Lr9DaqS+Y73GsldY"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d99112a9-ea14-4d67-b22e-48df5bb695f8"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "2aH5aYQrhHqblpVeKR7lBO"
},
{
"__type__": "cc.Node",
"_name": "bottle_top",
"_objFlags": 0,
"_parent": {
"__id__": 16
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 227,
......@@ -968,7 +1061,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
"__id__": 19
},
"_enabled": true,
"_materials": [],
......@@ -1002,7 +1095,7 @@
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 22
}
],
"_prefab": null,
......@@ -1058,7 +1151,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 21
},
"_enabled": true,
"_materials": [],
......@@ -1092,7 +1185,7 @@
"_active": true,
"_components": [
{
"__id__": 22
"__id__": 24
}
],
"_prefab": null,
......@@ -1148,7 +1241,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
"__id__": 23
},
"_enabled": true,
"_materials": [],
......@@ -1182,7 +1275,7 @@
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 26
}
],
"_prefab": null,
......@@ -1238,7 +1331,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 25
},
"_enabled": true,
"_materials": [],
......@@ -1272,7 +1365,7 @@
"_active": true,
"_components": [
{
"__id__": 26
"__id__": 28
}
],
"_prefab": null,
......@@ -1328,7 +1421,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
"__id__": 27
},
"_enabled": true,
"_materials": [],
......@@ -1362,7 +1455,7 @@
"_active": true,
"_components": [
{
"__id__": 28
"__id__": 30
}
],
"_prefab": null,
......@@ -1418,7 +1511,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
"__id__": 29
},
"_enabled": true,
"_materials": [],
......@@ -1452,7 +1545,7 @@
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 32
}
],
"_prefab": null,
......@@ -1508,7 +1601,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
"__id__": 31
},
"_enabled": true,
"_materials": [],
......@@ -1542,7 +1635,7 @@
"_active": true,
"_components": [
{
"__id__": 32
"__id__": 34
}
],
"_prefab": null,
......@@ -1598,7 +1691,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 31
"__id__": 33
},
"_enabled": true,
"_materials": [],
......@@ -1632,7 +1725,7 @@
"_active": true,
"_components": [
{
"__id__": 34
"__id__": 36
}
],
"_prefab": null,
......@@ -1688,7 +1781,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
"__id__": 35
},
"_enabled": true,
"_materials": [],
......@@ -1722,7 +1815,7 @@
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 38
}
],
"_prefab": null,
......@@ -1778,7 +1871,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 37
},
"_enabled": true,
"_materials": [],
......@@ -1812,7 +1905,7 @@
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 40
}
],
"_prefab": null,
......@@ -1868,7 +1961,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
"__id__": 39
},
"_enabled": true,
"_materials": [],
......@@ -1902,7 +1995,7 @@
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 42
}
],
"_prefab": null,
......@@ -1958,7 +2051,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 41
},
"_enabled": true,
"_materials": [],
......@@ -1992,7 +2085,7 @@
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 44
}
],
"_prefab": null,
......@@ -2048,7 +2141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 43
},
"_enabled": true,
"_materials": [],
......@@ -2082,7 +2175,7 @@
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 46
}
],
"_prefab": null,
......@@ -2138,7 +2231,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 43
"__id__": 45
},
"_enabled": true,
"_materials": [],
......@@ -2172,7 +2265,7 @@
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 48
}
],
"_prefab": null,
......@@ -2228,7 +2321,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
"__id__": 47
},
"_enabled": true,
"_materials": [],
......@@ -2262,7 +2355,7 @@
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 50
}
],
"_prefab": null,
......@@ -2318,7 +2411,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 49
},
"_enabled": true,
"_materials": [],
......@@ -2352,7 +2445,7 @@
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 52
}
],
"_prefab": null,
......@@ -2408,7 +2501,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 49
"__id__": 51
},
"_enabled": true,
"_materials": [],
......@@ -2442,7 +2535,7 @@
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 54
}
],
"_prefab": null,
......@@ -2498,7 +2591,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
"__id__": 53
},
"_enabled": true,
"_materials": [],
......@@ -2532,7 +2625,7 @@
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 56
}
],
"_prefab": null,
......@@ -2588,7 +2681,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 55
},
"_enabled": true,
"_materials": [],
......@@ -2622,7 +2715,7 @@
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 58
}
],
"_prefab": null,
......@@ -2678,7 +2771,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 57
},
"_enabled": true,
"_materials": [],
......@@ -2710,10 +2803,13 @@
},
"_children": [
{
"__id__": 58
"__id__": 60
},
{
"__id__": 60
"__id__": 62
},
{
"__id__": 64
}
],
"_active": true,
......@@ -2771,13 +2867,13 @@
"_name": "MMTextBook-Bold",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 59
"__id__": 61
}
],
"_prefab": null,
......@@ -2833,7 +2929,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 58
"__id__": 60
},
"_enabled": true,
"_materials": [],
......@@ -2865,13 +2961,13 @@
"_name": "aharoni",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 63
}
],
"_prefab": null,
......@@ -2927,7 +3023,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
"__id__": 62
},
"_enabled": true,
"_materials": [],
......@@ -2954,6 +3050,100 @@
"_N$cacheMode": 0,
"_id": "3feAb8QaBNrovbtqW1lEr0"
},
{
"__type__": "cc.Node",
"_name": "Berlin-Sans-FB",
"_objFlags": 0,
"_parent": {
"__id__": 59
},
"_children": [],
"_active": true,
"_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": "95bIAoz8dI7a6hHh639KFN"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 64
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_useOriginalSize": true,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "032f922b-6bff-4ad3-9a3b-1212d5394c42"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "1f/zciJmZB3qcJLLF4z0xc"
},
{
"__type__": "cc.Node",
"_name": "anima",
......@@ -2963,13 +3153,13 @@
},
"_children": [
{
"__id__": 63
"__id__": 67
},
{
"__id__": 65
"__id__": 69
},
{
"__id__": 67
"__id__": 71
}
],
"_active": true,
......@@ -3027,13 +3217,13 @@
"_name": "wrongAndRight",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 68
}
],
"_prefab": null,
......@@ -3089,7 +3279,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 67
},
"_enabled": true,
"_materials": [
......@@ -3129,13 +3319,13 @@
"_name": "speak",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 70
}
],
"_prefab": null,
......@@ -3191,7 +3381,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 69
},
"_enabled": true,
"_materials": [
......@@ -3231,13 +3421,13 @@
"_name": "role",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 66
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 72
}
],
"_prefab": null,
......@@ -3293,7 +3483,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 67
"__id__": 71
},
"_enabled": true,
"_materials": [],
......@@ -3332,12 +3522,6 @@
"__id__": 15
},
"_children": [
{
"__id__": 70
},
{
"__id__": 72
},
{
"__id__": 74
},
......@@ -3358,6 +3542,12 @@
},
{
"__id__": 86
},
{
"__id__": 88
},
{
"__id__": 90
}
],
"_active": true,
......@@ -3415,13 +3605,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 71
"__id__": 75
}
],
"_prefab": null,
......@@ -3477,7 +3667,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 70
"__id__": 74
},
"_enabled": true,
"_clip": {
......@@ -3495,13 +3685,13 @@
"_name": "cap",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 73
"__id__": 77
}
],
"_prefab": null,
......@@ -3557,7 +3747,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
"__id__": 76
},
"_enabled": true,
"_clip": {
......@@ -3575,13 +3765,13 @@
"_name": "click",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 75
"__id__": 79
}
],
"_prefab": null,
......@@ -3637,7 +3827,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
"__id__": 78
},
"_enabled": true,
"_clip": {
......@@ -3655,13 +3845,13 @@
"_name": "star",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 81
}
],
"_prefab": null,
......@@ -3717,7 +3907,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 80
},
"_enabled": true,
"_clip": {
......@@ -3735,13 +3925,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 79
"__id__": 83
}
],
"_prefab": null,
......@@ -3797,7 +3987,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
"__id__": 82
},
"_enabled": true,
"_clip": {
......@@ -3815,13 +4005,13 @@
"_name": "wrong",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
"__id__": 85
}
],
"_prefab": null,
......@@ -3877,7 +4067,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 84
},
"_enabled": true,
"_clip": {
......@@ -3895,13 +4085,13 @@
"_name": "speak",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 83
"__id__": 87
}
],
"_prefab": null,
......@@ -3957,7 +4147,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 86
},
"_enabled": true,
"_clip": {
......@@ -3975,13 +4165,13 @@
"_name": "scroll",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 85
"__id__": 89
}
],
"_prefab": null,
......@@ -4037,7 +4227,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
"__id__": 88
},
"_enabled": true,
"_clip": {
......@@ -4055,13 +4245,13 @@
"_name": "show",
"_objFlags": 0,
"_parent": {
"__id__": 69
"__id__": 73
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 91
}
],
"_prefab": null,
......@@ -4117,7 +4307,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
"__id__": 90
},
"_enabled": true,
"_clip": {
......@@ -4194,12 +4384,6 @@
"__id__": 1
},
"_children": [
{
"__id__": 92
},
{
"__id__": 94
},
{
"__id__": 96
},
......@@ -4217,6 +4401,12 @@
},
{
"__id__": 106
},
{
"__id__": 108
},
{
"__id__": 110
}
],
"_active": false,
......@@ -4274,13 +4464,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 93
"__id__": 97
}
],
"_prefab": null,
......@@ -4336,7 +4526,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 92
"__id__": 96
},
"_enabled": true,
"_materials": [
......@@ -4366,13 +4556,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
"__id__": 99
}
],
"_prefab": null,
......@@ -4428,7 +4618,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 98
},
"_enabled": true,
"_materials": [
......@@ -4458,13 +4648,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 97
"__id__": 101
}
],
"_prefab": null,
......@@ -4520,7 +4710,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 96
"__id__": 100
},
"_enabled": true,
"_materials": [
......@@ -4550,13 +4740,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 99
"__id__": 103
}
],
"_prefab": null,
......@@ -4612,7 +4802,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 98
"__id__": 102
},
"_enabled": true,
"_materials": [
......@@ -4642,13 +4832,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 101
"__id__": 105
}
],
"_prefab": null,
......@@ -4704,7 +4894,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 100
"__id__": 104
},
"_enabled": true,
"_materials": [
......@@ -4734,13 +4924,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 103
"__id__": 107
}
],
"_prefab": null,
......@@ -4796,7 +4986,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 102
"__id__": 106
},
"_enabled": true,
"_materials": [
......@@ -4826,13 +5016,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 105
"__id__": 109
}
],
"_prefab": null,
......@@ -4888,7 +5078,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 104
"__id__": 108
},
"_enabled": true,
"_materials": [
......@@ -4918,13 +5108,13 @@
"_name": "sahua",
"_objFlags": 0,
"_parent": {
"__id__": 91
"__id__": 95
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 107
"__id__": 111
}
],
"_prefab": null,
......@@ -4980,7 +5170,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 106
"__id__": 110
},
"_enabled": true,
"_materials": [
......
......@@ -112,9 +112,8 @@ cc.Class({
},
getDefaultData() {
const dataJson = '{"groupArr":[{"ques":"Who","optionArr":[],"question":"aaaa aaaa a a aaaaa a aaaaa aaa","answer":"bbb bbbbb b b bbbb bbbbbb","pic_url":"http://staging-teach.cdn.ireadabc.com/7709a0ddfde321cb70fc3099da32c35b.png"},{"ques":"","optionArr":[],"question":"ccccccc","answer":"ddddddddddd ddddddd ddd dddddd dddd","pic_url":"http://staging-teach.cdn.ireadabc.com/7b18a7931d64f7b9e8b7ecd25cb5e3d4.png"}],"title_1":"Abc ddd","title_2":"Efff aaa bbb","title_audio_url":"http://staging-teach.cdn.ireadabc.com/83513f8d6083ebe072e3f9e47a21558a.mp3"}';
const data1 = JSON.parse(dataJson);
return data1;
const data = {"groupArr":[{"ques":"Who","optionArr":[],"question":"What's your name?","answer":"bbb bbbbb b b bbbb bbbbbb","pic_url":"http://staging-teach.cdn.ireadabc.com/7709a0ddfde321cb70fc3099da32c35b.png"},{"ques":"","optionArr":[],"question":"How are you.","answer":"ddddddddddd ddddddd ddd dddddd dddd","pic_url":"http://staging-teach.cdn.ireadabc.com/7b18a7931d64f7b9e8b7ecd25cb5e3d4.png"}],"title_1":"Abc ddd","title_2":"Efff aaa bbb","title_audio_url":"http://staging-teach.cdn.ireadabc.com/83513f8d6083ebe072e3f9e47a21558a.mp3"};
return data;
},
......@@ -193,6 +192,13 @@ cc.Class({
console.log(' in addServerListener 2 : ', this.isTeacher);
c.onEvent('show_score', (data, next) => {
console.log('in show_score event', data);
this.showScore(data.score);
next();
});
if (this.isTeacher) {
c.onEvent('show_cap', (data, next) => {
......@@ -262,6 +268,49 @@ cc.Class({
},
showScore(score) {
console.log('in show score : ', score);
score = Math.round(score);
const sPanel = this.studentPanel;
const labelNode = new cc.Node();
labelNode.parent = sPanel;
labelNode.zIndex = 5;
labelNode.x = -sPanel.width / 2 + 70;
labelNode.y = sPanel.height / 2;
const label = labelNode.addComponent(cc.Label);
label.font = cc.find('Canvas/res/font/MMTextBook-Bold').getComponent(cc.Label).font;
label.string = "+" + score;
label.fontSize = 70;
label.lineHeight = 70;
const color = new cc.Color();
cc.Color.fromHEX(color, "#9ad37e");
labelNode.color = color;
const labelShadow = labelNode.addComponent(cc.LabelShadow);
labelShadow.offset = new cc.Vec2(0, -4);
const shadowColor = new cc.Color();
cc.Color.fromHEX(shadowColor, "#8ec773");
labelShadow.color = shadowColor;
cc.tween(labelNode)
.to(0.7, {y: labelNode.y + 100, opacity: 255}, {easing: "cubicOut"})
.delay(0.5)
.to(0.3, {opacity: 0})
.call(() => {
labelNode.removeFromParent();
})
.start();
},
historyData: null,
initHistoryData(user_aspect) {
......@@ -347,6 +396,7 @@ cc.Class({
maskLayer: null,
groupIndex: null,
historyData: null,
initData() {
// this.penguinPool = [];
......@@ -360,6 +410,8 @@ cc.Class({
this.maskLayer = cc.find('Canvas/mask')
this.initPosArr();
this.historyData = {};
},
posData: null,
......@@ -418,30 +470,28 @@ cc.Class({
// this.initBtn();
// this.showSoundBtn();
this.test();
this.initSSG();
// this.curBottle = this.bottleArr[0];
// this.changeLayer();
},
engine: null,
test() {
engineInitSuccess: null,
initSSG() {
//初始化先生评测
const engineFirstInitDone = () => {
this.engineInitSuccess = true;
console.log('引擎初始化成功回调 !');
}
const engineBackResultDone = () => {
console.log('引擎返回结果成功回调');
}
const engineBackResultFail = () => {
console.log('引擎返回结果失败回调');
}
const JSSDKNotSupport = () => {
console.log('sdk不支持当前浏览器回调');
}
const params = {
......@@ -449,34 +499,39 @@ cc.Class({
engineBackResultDone,
engineBackResultFail,
JSSDKNotSupport,
applicationId: 'a721',
userId: 'guest'
"applicationId": "a721",
"userId": "iplayabc",
"warrantId": "6073c7fa4dbaa4d1fad6d62f2de3dab2c"
}
this.engine = new window.EngineEvaluat(params)
},
recordStart() {
recordStart(refText) {
console.log(' start record')
const params = {
if (!this.engineInitSuccess) {
console.error("评测初始化异常");
}
console.log("refText: ", refText);
const params = {
coreType: 'en.word.score',
refText:'word',
refText,
precision:0.5
}
const done = () => {
console.log('~~~~~ done');
const done = (e) => {
// console.log('~~~~~ done: ', e);
const res = JSON.parse(e);
const score = res.result.overall;
console.log('score: ', score);
this.sendServerEvent('show_score', {score})
}
const fail = () => {
console.log('~~~~ fail');
}
this.engine.startRecord(params, done, fail);
},
recordStop() {
console.log(' stop record')
this.engine.stopRecord();
},
......@@ -544,8 +599,6 @@ cc.Class({
canvas.off(cc.Node.EventType.MOUSE_LEAVE, mouseUp)
}
this.removeHtmlTouchEnd();
this.recordStop();
}
const mouseUp = (e) => {
......@@ -712,7 +765,6 @@ cc.Class({
this.role.hand.active = false;
playAudio(this.clickClip);
this.recordStart();
})
},
......@@ -1053,13 +1105,15 @@ cc.Class({
showSpeakIconLight() {
this.speakBtn.opacity = 100;
this.speakBtn.isSHow = true;
this.speakBtn.animaNode.active = true;
this.speakBtn.isShow = true;
},
hideSpeakIconLight() {
this.speakBtn.opacity = 255;
this.speakBtn.isSHow = false;
this.speakBtn.animaNode.active = false;
this.speakBtn.isShow = false;
},
......@@ -1078,6 +1132,11 @@ cc.Class({
this.appear(this.speakIcon, 0.5)
playAudio(this.speakClip);
const quesText = this.curBottle.data.question;
this.recordStart(quesText);
// if (this.speakTween) {
// this.speakTween.stop();
......@@ -1095,6 +1154,7 @@ cc.Class({
this.disappear(this.speakIcon, 0.3, () => {
this.speakIcon.active = false;
})
this.recordStop();
},
appear(node, time) {
......@@ -1302,6 +1362,7 @@ cc.Class({
const speak = getSprNode('btn_speak');
this.speakBtn = speak;
speak.parent = this.studentPanel;
speak.zIndex = 1;
speak.x = -this.studentPanel.width / 2 + speak.width / 2 + 28;
speak.y = this.studentPanel.height / 2 + 2;
this.addBtnClickFunc(speak, () => {
......@@ -1315,6 +1376,15 @@ cc.Class({
}
})
const speakAnimaNode = new cc.Node();
speakAnimaNode.parent = speak.parent;
speakAnimaNode.x = speak.x;
speakAnimaNode.y = speak.y;
speakAnimaNode.active = false;
speak.animaNode = speakAnimaNode;
this.updateSpeakAnimaNode();
let offX = -20 * this._mapScaleMin;
let offY = 0;
const right = getSprNode('btn_right');
......@@ -1369,6 +1439,28 @@ cc.Class({
},
updateSpeakAnimaNode() {
const speakAnimaNode = this.speakBtn.animaNode;
const speakCircle = getSprNode("bg_speak");
speakCircle.parent = speakAnimaNode;
speakCircle.scale = 0.8;
cc.tween(speakCircle)
.to(2.5, {opacity: 0, scale: 1.5}, {easing: "cubicOut"})
.call(() => {
speakCircle.removeFromParent();
})
.start();
this.delayCall(0.5, () => {
this.updateSpeakAnimaNode();
})
},
addBtnClickFunc(node, cb) {
node.addComponent(cc.Button);
node.on(cc.Node.EventType.TOUCH_START, () => {
......
{
"ver": "1.1.0",
"uuid": "032f922b-6bff-4ad3-9a3b-1212d5394c42",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c4d7bfb4-e710-4120-aa28-920ff602d8cb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 106,
"height": 108,
"platformSettings": {},
"subMetas": {
"bg_speak": {
"ver": "1.0.4",
"uuid": "d99112a9-ea14-4d67-b22e-48df5bb695f8",
"rawTextureUuid": "c4d7bfb4-e710-4120-aa28-920ff602d8cb",
"trimType": "custom",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 106,
"height": 108,
"rawWidth": 106,
"rawHeight": 108,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
No preview for this file type
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