Commit 83628316 authored by Tt's avatar Tt

录音部分完成

parent 4bd56c06
......@@ -93,25 +93,25 @@
"__id__": 33
},
{
"__id__": 41
"__id__": 51
},
{
"__id__": 50
"__id__": 59
},
{
"__id__": 57
"__id__": 66
}
],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 86
},
{
"__id__": 78
"__id__": 87
},
{
"__id__": 79
"__id__": 88
}
],
"_prefab": null,
......@@ -1531,7 +1531,7 @@
},
{
"__type__": "cc.Node",
"_name": "layout_xiaodi",
"_name": "layout_record",
"_objFlags": 0,
"_parent": {
"__id__": 2
......@@ -1542,14 +1542,19 @@
},
{
"__id__": 36
}
],
"_active": true,
"_components": [
},
{
"__id__": 40
"__id__": 41
},
{
"__id__": 43
},
{
"__id__": 45
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
......@@ -1573,8 +1578,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
-762.645,
-398.618,
0,
0,
0,
......@@ -1596,11 +1601,11 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b6B1rFkuhLeaPw9fUry5ZX"
"_id": "00XMxwg7NIOJvf2n/Cchnu"
},
{
"__type__": "cc.Node",
"_name": "ani",
"_name": "btn_restart",
"_objFlags": 0,
"_parent": {
"__id__": 33
......@@ -1623,8 +1628,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 538,
"height": 936.76
"width": 158,
"height": 158
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1635,15 +1640,15 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
800.397,
-269.342,
6.126,
5.786,
0,
0,
0,
0,
1,
0.5,
0.5,
1,
1,
1
]
},
......@@ -1658,10 +1663,10 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "efGR3HctZKKKWhd0AOI4+1"
"_id": "1foBDZ4NhEdKKeOFTW0HJo"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
......@@ -1673,36 +1678,28 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_armatureName": "Armature",
"_animationName": "normal",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "34050f77-f719-46e0-bcd3-380be6bcc75e#fdc28b4f-46c5-4fe2-897b-50cad1d6c0f8",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "34050f77-f719-46e0-bcd3-380be6bcc75e"
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "01221e7a-2735-4689-b4cc-7ef2fef5b533"
},
"_N$dragonAtlasAsset": {
"__uuid__": "fdc28b4f-46c5-4fe2-897b-50cad1d6c0f8"
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 9,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "96dQzTKLRG7bkhZrxxAM7W"
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b5PQvSCQFMNZ2Z4Mkm2JHK"
},
{
"__type__": "cc.Node",
"_name": "btn_go",
"_name": "btn_vioce",
"_objFlags": 0,
"_parent": {
"__id__": 33
......@@ -1712,10 +1709,10 @@
"__id__": 37
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 39
"__id__": 40
}
],
"_prefab": null,
......@@ -1729,8 +1726,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 257,
"height": 166
"width": 158,
"height": 158
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1741,8 +1738,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
823.5,
-16.021,
4.483,
6.845,
0,
0,
0,
......@@ -1764,11 +1761,11 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "42rSmZ23RMOKGbxNt5OtEc"
"_id": "a0YV9WCMlB1J1qpWj+U3Mh"
},
{
"__type__": "cc.Node",
"_name": "text",
"_name": "img_ing",
"_objFlags": 0,
"_parent": {
"__id__": 36
......@@ -1778,6 +1775,9 @@
"_components": [
{
"__id__": 38
},
{
"__id__": 39
}
],
"_prefab": null,
......@@ -1791,8 +1791,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 97.87,
"height": 50.4
"width": 158,
"height": 158
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1803,8 +1803,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
9,
0.182,
-0.09,
0,
0,
0,
......@@ -1826,10 +1826,10 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cdvCcFFOZBc6wzkzIE+uOD"
"_id": "de4+F7BwtAt5ow6WrgwyjM"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
......@@ -1843,23 +1843,92 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "afc8hY+ZlPH7Qv0lzw0KDE"
"_spriteFrame": {
"__uuid__": "51c85556-93eb-4774-8d44-0c6bbf044bda"
},
"_type": 3,
"_sizeMode": 0,
"_fillType": 2,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_fillStart": 0.25,
"_fillRange": 1,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "85HncTZY5AToqFa9LwH7//"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 37
},
"_id": "ecrPqC/gZDobH2MQs86M5z"
},
{
"__type__": "cc.Sprite",
......@@ -1877,7 +1946,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dfaa53f7-2471-4f5c-9eb3-f8e618266970"
"__uuid__": "b3bc5756-e154-4507-9714-45cf77779e85"
},
"_type": 0,
"_sizeMode": 1,
......@@ -1891,58 +1960,35 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "081c8EsC1PxrMdFwW3Js/m"
},
{
"__type__": "c1365UlXeRF06wqTYLngZ5h",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"aniRole": {
"__id__": 34
},
"moveX": 500,
"_id": "e4RrOXSNJGd68Mq3UTYY0p"
"_id": "c3VF+UD2lGcI/uuaRRfA63"
},
{
"__type__": "cc.Node",
"_name": "layout_record",
"_name": "label_tip_wait",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 33
},
"_children": [
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 44
},
{
"__id__": 46
},
{
"__id__": 48
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"r": 44,
"g": 141,
"b": 218,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
"width": 288,
"height": 60.48
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1953,8 +1999,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-762.645,
-398.618,
267.253,
4.868,
0,
0,
0,
......@@ -1976,35 +2022,68 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "00XMxwg7NIOJvf2n/Cchnu"
"_id": "04f10LO3tGS7yENhTqswgL"
},
{
"__type__": "cc.Node",
"_name": "icon_restar",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"_parent": {
"node": {
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
"_enabled": true,
"_materials": [
{
"__id__": 43
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "请录音回答吧",
"_N$string": "请录音回答吧",
"_fontSize": 48,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 1,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7bC3Dz6a1E2q2tCpZdwoJ+"
},
{
"__type__": "cc.Node",
"_name": "label_tip_ing",
"_objFlags": 0,
"_parent": {
"__id__": 33
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 44,
"g": 141,
"b": 218,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 158,
"height": 158
"width": 192,
"height": 60.48
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2015,8 +2094,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
6.126,
5.786,
217.904,
4.868,
0,
0,
0,
......@@ -2038,14 +2117,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "1foBDZ4NhEdKKeOFTW0HJo"
"_id": "0fosofKDNIHaIfk271/5PU"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
"__id__": 43
},
"_enabled": true,
"_materials": [
......@@ -2055,35 +2134,325 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "01221e7a-2735-4689-b4cc-7ef2fef5b533"
"_string": "正在录音",
"_N$string": "正在录音",
"_fontSize": 48,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 1,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "91I7w2zdlAap7tT9wHqDDi"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
{
"__type__": "cc.Node",
"_name": "rich_content",
"_objFlags": 0,
"_parent": {
"__id__": 33
},
"_children": [
{
"__id__": 46
},
{
"__id__": 48
}
],
"_active": true,
"_components": [
{
"__id__": 50
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 900,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
123.24,
4.25,
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": "6cOUurtetDW5xRDyHAPP83"
},
{
"__type__": "cc.PrivateNode",
"_name": "RICHTEXT_CHILD",
"_objFlags": 1024,
"_parent": {
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 47
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 29,
"g": 139,
"b": 56,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 472.45,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "b5PQvSCQFMNZ2Z4Mkm2JHK"
"_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,
"showInEditor": false,
"_id": "beLa1M0zNOn5faWkjLVLYU"
},
{
"__type__": "cc.Node",
"_name": "icon_vioce",
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 46
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "This is the build",
"_N$string": "This is the build",
"_fontSize": 68,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "48K8tp/whJI7rnbaVh6hr3"
},
{
"__type__": "cc.PrivateNode",
"_name": "RICHTEXT_CHILD",
"_objFlags": 1024,
"_parent": {
"__id__": 41
"__id__": 45
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 49,
"g": 49,
"b": 49,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 136.07,
"height": 75.6
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_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,
"showInEditor": false,
"_id": "419V+A57dBuaNHlQ616TS2"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": " tree",
"_N$string": " tree",
"_fontSize": 68,
"_lineHeight": 60,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "daZYEHYuVLaZ4oTRaguzJZ"
},
{
"__type__": "cc.RichText",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"_fontFamily": "Arial",
"_isSystemFontUsed": true,
"_N$string": "<color=#1D8B38>This is the build</c><color=#313131> tree</color>",
"_N$horizontalAlign": 0,
"_N$fontSize": 68,
"_N$font": null,
"_N$cacheMode": 0,
"_N$maxWidth": 900,
"_N$lineHeight": 60,
"_N$imageAtlas": null,
"_N$handleTouchEvent": true,
"_id": "81gZVF6wpG8ZYp8wKdAMKS"
},
{
"__type__": "cc.Node",
"_name": "layout_xiaodi",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 52
},
{
"__id__": 54
}
],
"_active": true,
"_components": [
{
"__id__": 58
}
],
"_prefab": null,
......@@ -2097,8 +2466,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 158,
"height": 158
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2109,8 +2478,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.483,
6.845,
0,
0,
0,
0,
0,
......@@ -2132,14 +2501,76 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a0YV9WCMlB1J1qpWj+U3Mh"
"_id": "b6B1rFkuhLeaPw9fUry5ZX"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Node",
"_name": "ani",
"_objFlags": 0,
"_parent": {
"__id__": 51
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 53
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 538,
"height": 936.76
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
800.397,
-269.342,
0,
0,
0,
0,
1,
0.5,
0.5,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "efGR3HctZKKKWhd0AOI4+1"
},
{
"__type__": "dragonBones.ArmatureDisplay",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 52
},
"_enabled": true,
"_materials": [
......@@ -2147,37 +2578,49 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b3bc5756-e154-4507-9714-45cf77779e85"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"_armatureName": "Armature",
"_animationName": "normal",
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"_armatureKey": "34050f77-f719-46e0-bcd3-380be6bcc75e#fdc28b4f-46c5-4fe2-897b-50cad1d6c0f8",
"_accTime": 0,
"_playCount": 0,
"_frameCache": null,
"_curFrame": null,
"_playing": false,
"_armatureCache": null,
"_N$dragonAsset": {
"__uuid__": "34050f77-f719-46e0-bcd3-380be6bcc75e"
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c3VF+UD2lGcI/uuaRRfA63"
"_N$dragonAtlasAsset": {
"__uuid__": "fdc28b4f-46c5-4fe2-897b-50cad1d6c0f8"
},
"_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 9,
"_N$_defaultCacheMode": 0,
"_N$timeScale": 1,
"_N$debugBones": false,
"_N$enableBatch": false,
"_id": "96dQzTKLRG7bkhZrxxAM7W"
},
{
"__type__": "cc.Node",
"_name": "img_voice_ing",
"_name": "btn_go",
"_objFlags": 0,
"_parent": {
"__id__": 41
"__id__": 51
},
"_children": [],
"_active": true,
"_children": [
{
"__id__": 55
}
],
"_active": false,
"_components": [
{
"__id__": 47
"__id__": 57
}
],
"_prefab": null,
......@@ -2191,8 +2634,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 158,
"height": 158
"width": 257,
"height": 166
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2203,8 +2646,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
4.665,
6.755,
823.5,
-16.021,
0,
0,
0,
......@@ -2226,67 +2669,35 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "de4+F7BwtAt5ow6WrgwyjM"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 46
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "51c85556-93eb-4774-8d44-0c6bbf044bda"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "85HncTZY5AToqFa9LwH7//"
"_id": "42rSmZ23RMOKGbxNt5OtEc"
},
{
"__type__": "cc.Node",
"_name": "label_title",
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 41
"__id__": 54
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
"__id__": 56
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 44,
"g": 141,
"b": 218,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 288,
"height": 60.48
"width": 97.87,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2297,8 +2708,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
267.253,
4.868,
0,
9,
0,
0,
0,
......@@ -2320,14 +2731,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "04f10LO3tGS7yENhTqswgL"
"_id": "cdvCcFFOZBc6wzkzIE+uOD"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
"__id__": 55
},
"_enabled": true,
"_materials": [
......@@ -2337,23 +2748,69 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "请录音回答吧",
"_N$string": "请录音回答吧",
"_fontSize": 48,
"_lineHeight": 48,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 1,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7bC3Dz6a1E2q2tCpZdwoJ+"
"_id": "afc8hY+ZlPH7Qv0lzw0KDE"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dfaa53f7-2471-4f5c-9eb3-f8e618266970"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "081c8EsC1PxrMdFwW3Js/m"
},
{
"__type__": "c1365UlXeRF06wqTYLngZ5h",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
},
"_enabled": true,
"aniRole": {
"__id__": 52
},
"moveX": 500,
"_id": "e4RrOXSNJGd68Mq3UTYY0p"
},
{
"__type__": "cc.Node",
......@@ -2364,13 +2821,13 @@
},
"_children": [
{
"__id__": 51
"__id__": 60
},
{
"__id__": 53
"__id__": 62
},
{
"__id__": 55
"__id__": 64
}
],
"_active": true,
......@@ -2428,13 +2885,13 @@
"_name": "btn_return",
"_objFlags": 0,
"_parent": {
"__id__": 50
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 52
"__id__": 61
}
],
"_prefab": null,
......@@ -2490,7 +2947,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 51
"__id__": 60
},
"_enabled": true,
"_materials": [
......@@ -2522,13 +2979,13 @@
"_name": "icon_play",
"_objFlags": 0,
"_parent": {
"__id__": 50
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 54
"__id__": 63
}
],
"_prefab": null,
......@@ -2584,7 +3041,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 53
"__id__": 62
},
"_enabled": true,
"_materials": [
......@@ -2616,13 +3073,13 @@
"_name": "icon_stop",
"_objFlags": 0,
"_parent": {
"__id__": 50
"__id__": 59
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 56
"__id__": 65
}
],
"_prefab": null,
......@@ -2678,7 +3135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 55
"__id__": 64
},
"_enabled": true,
"_materials": [
......@@ -2714,13 +3171,13 @@
},
"_children": [
{
"__id__": 58
"__id__": 67
},
{
"__id__": 61
"__id__": 70
},
{
"__id__": 62
"__id__": 71
}
],
"_active": true,
......@@ -2778,11 +3235,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 66
},
"_children": [
{
"__id__": 59
"__id__": 68
}
],
"_active": true,
......@@ -2840,13 +3297,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 58
"__id__": 67
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 60
"__id__": 69
}
],
"_prefab": null,
......@@ -2902,7 +3359,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 68
},
"_enabled": true,
"_materials": [
......@@ -2937,7 +3394,7 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 66
},
"_children": [],
"_active": true,
......@@ -2995,29 +3452,29 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 57
"__id__": 66
},
"_children": [
{
"__id__": 63
"__id__": 72
},
{
"__id__": 65
"__id__": 74
},
{
"__id__": 67
"__id__": 76
},
{
"__id__": 69
"__id__": 78
},
{
"__id__": 71
"__id__": 80
},
{
"__id__": 73
"__id__": 82
},
{
"__id__": 75
"__id__": 84
}
],
"_active": true,
......@@ -3075,13 +3532,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 73
}
],
"_prefab": null,
......@@ -3137,7 +3594,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 63
"__id__": 72
},
"_enabled": true,
"_clip": {
......@@ -3156,13 +3613,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 75
}
],
"_prefab": null,
......@@ -3218,7 +3675,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 65
"__id__": 74
},
"_enabled": true,
"_clip": {
......@@ -3237,13 +3694,13 @@
"_name": "bettery",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 68
"__id__": 77
}
],
"_prefab": null,
......@@ -3299,7 +3756,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 67
"__id__": 76
},
"_enabled": true,
"_clip": {
......@@ -3318,13 +3775,13 @@
"_name": "error",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 70
"__id__": 79
}
],
"_prefab": null,
......@@ -3380,7 +3837,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
"__id__": 78
},
"_enabled": true,
"_clip": {
......@@ -3399,13 +3856,13 @@
"_name": "bgm",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 81
}
],
"_prefab": null,
......@@ -3461,7 +3918,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 80
},
"_enabled": true,
"_clip": {
......@@ -3480,13 +3937,13 @@
"_name": "opendoor",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 74
"__id__": 83
}
],
"_prefab": null,
......@@ -3542,7 +3999,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 82
},
"_enabled": true,
"_clip": {
......@@ -3561,13 +4018,13 @@
"_name": "light",
"_objFlags": 0,
"_parent": {
"__id__": 62
"__id__": 71
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 76
"__id__": 85
}
],
"_prefab": null,
......@@ -3623,7 +4080,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 84
},
"_enabled": true,
"_clip": {
......@@ -3695,6 +4152,21 @@
"label_title": {
"__id__": 31
},
"btn_vioce": {
"__id__": 36
},
"btn_restart": {
"__id__": 34
},
"label_tip_wait": {
"__id__": 41
},
"label_tip_ing": {
"__id__": 43
},
"rich_content": {
"__id__": 45
},
"_id": "6eW7M4ET1L4KOTzIOVRmf8"
}
]
\ No newline at end of file
......@@ -3,6 +3,8 @@ import { MyCocosSceneComponent } from "../script/MyCocosSceneComponent_dg18_tian
import pg from "./pg_dg18_tianci";
import dg_xiaodi from "./dg18_tianci_xiaodi";
let win: any = window;
let courseware = win.courseware;
const { ccclass, property } = cc._decorator;
@ccclass
......@@ -28,10 +30,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initData();
this.initView();
this.initEvent();
pg.view.find(this, 'layout_xiaodi').getComponent(dg_xiaodi).playEnter(this.data.npcAudio).then(() => {
this.initGame();
})
// pg.view.find(this, 'layout_xiaodi').getComponent(dg_xiaodi).playEnter(this.data.npcAudio).then(() => {
// this.initGame();
// })
this.initGame();
}
_cantouch = null;
......@@ -56,13 +58,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node) question_img: cc.Node = null;
@property(cc.Node) label_title: cc.Node = null;
@property(cc.Node) btn_vioce: cc.Node = null;
@property(cc.Node) btn_restart: cc.Node = null;
@property(cc.Node) label_tip_wait: cc.Node = null;
@property(cc.Node) label_tip_ing: cc.Node = null;
@property(cc.Node) rich_content: cc.Node = null;
// 初始化页面
initView() {
this.btn_vioce.active = false;
this.btn_restart.active = false;
this.label_tip_wait.active = false;
this.label_tip_ing.active = false;
this.rich_content.active = false;
}
// 事件监听
initEvent() {
pg.view.touchOn(this.btn_vioce, this.onTouchRecord, this);
pg.view.touchOn(pg.view.find(this.btn_vioce,'img_ing'), this.onTouchRecordEnd, this);
}
// 初始化游戏
initGame() {
......@@ -83,17 +96,137 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
this.current++
this.successArr = [];
this.targetTime = 10//this.currentQuestion.targetTime
this.updateQuestion();
}
updateQuestion() {
// 图片部分
pg.view.setNetImg(this.question_img, this.currentQuestion.img, { w: 1030, h: 720 })
pg.view.setString(this.label_title,this.currentQuestion.title);
pg.view.setString(this.label_title, this.currentQuestion.title);
this.btn_vioce.active = true;
pg.view.visible(pg.view.find(this.btn_vioce, 'img_ing'), false)
this.label_tip_wait.active = true;
}
//按钮触发,使用的方法
private targetTime: number;
private recordAudio: string;
private startTime: number;
private recording: boolean;
private voiceTouchForbid: boolean;
private count: number;
showTimeStart() {
if (!this.targetTime) return;
let nowTime = new Date().getTime();
this.startTime = nowTime;
}
showTimeUpdate() {
if (!this.startTime) return;
let nowTime = new Date().getTime();
let subTime = this.targetTime - (nowTime - this.startTime) / 1000 + 1;
if (subTime < 0) subTime = 0;
console.log('subTime->' + subTime)
this.label_tip_wait.active = false
this.label_tip_ing.active = true;
pg.view.visible(pg.view.find(this.btn_vioce, 'img_ing'), true)
let img_ing = pg.view.find(this.btn_vioce, 'img_ing')
img_ing.getComponent(cc.Sprite).fillRange = subTime / this.targetTime;
if (subTime == 0) {
this.onTouchRecordEnd();
}
}
showTimeEnd() {
this.startTime = null;
this.label_tip_wait.active = false
this.label_tip_ing.active = false;
pg.view.visible(pg.view.find(this.btn_vioce, 'img_ing'), false)
}
async onTouchRecord() {
if (this.recording) return;
if (this.recordAudio) return;
this.recording = true;
this.recordAudio = '';
this.voiceTouchForbid = true;
this.showTimeStart();
this.log("-----------------------startTest")
cc.audioEngine.stopAllEffects();
courseware && courseware.startRecord(1); //开始录音
}
async onTouchRecordEnd() {
if (!this.recording) return;
this.showTimeEnd();
let testData = {
"text": "Hello every one my name is world",
"audio": "https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav"
}
if (!courseware) {
return this.recordEnd(testData)
}
this.log("---------------courseware.stopTest:")
courseware && courseware.stopRecord(0, (data) => {
this.log("---------------stopRecord:" + data)
// res = JSON.parse(res);
// res.exampleAudio = this.currentQuestion.startAudio ? this.currentQuestion.startAudio : "";
// res.exampleText = this.currentQuestion.keyword ? this.currentQuestion.keyword : "";
// this.recrodEnd(isClear, res);
data = JSON.parse(data);
console.log("data: " + JSON.stringify(data));
this.recordEnd(data);
});//结束录音
}
recordEnd(data) {
const keyTextArr = this.currentQuestion.keyword.split(",");
const dataTextArr = data.text.split(" ");
let colorNormal = '#313131';
let colorRight = '#1D8B38';
let str = '';
let isRight = false;
for (let i = 0; i < dataTextArr.length; i++) {
const word = dataTextArr[i];
let color = colorNormal;
if (keyTextArr.indexOf(word) != -1) {
color = colorRight;
isRight = true;
}
str += `<color=${color}>${word}</color> `
}
this.rich_content.active = true;
const richText = this.rich_content.getComponent(cc.RichText);
richText.string = str;
}
showData(data) {
let list = data.result.sentences[0].details;
// 列表处理
let str = "";
let keystr = "";
for (let i = 0; i < list.length; i++) {
let li = list[i];
let s = "";
if (li.overall > 40) {
s = `<color=#000000> ${li.word} </c>`
} else {
s = `<color=#FF0000> ${li.word} </c>`
}
keystr += li.word + 2
str += s;
}
// this.label_rich.getComponent(cc.RichText).fontSize = num;
// this.label_rich.getComponent(cc.RichText).lineHeight = num;
// this.label_rich.getComponent(cc.RichText).string = str;
}
private waitTime: number;
update(dt) {
this.showTimeUpdate();
if (!this.waitTime) this.waitTime = 8;
this.waitTime -= dt;
if (this.waitTime < 0) {
......
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