Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn19_read
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
sn19_read
Commits
ddede972
Commit
ddede972
authored
Nov 10, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待提供无黑边图片
parent
eb692f80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
250 additions
and
124 deletions
+250
-124
sn19_read.fire
assets/sn19_read/scene/sn19_read.fire
+218
-118
sn19_read.ts
assets/sn19_read/scene/sn19_read.ts
+32
-6
No files found.
assets/sn19_read/scene/sn19_read.fire
View file @
ddede972
...
...
@@ -87,28 +87,31 @@
"__id__": 72
},
{
"__id__": 7
5
"__id__": 7
4
},
{
"__id__":
109
"__id__":
77
},
{
"__id__": 111
},
{
"__id__": 113
},
{
"__id__": 115
}
],
"_active": true,
"_components": [
{
"__id__": 13
3
"__id__": 13
5
},
{
"__id__": 13
4
"__id__": 13
6
},
{
"__id__": 13
5
"__id__": 13
7
}
],
"_prefab": null,
...
...
@@ -3449,19 +3452,113 @@
},
{
"__type__": "cc.Node",
"_name": "
ani
_npc",
"_name": "
img
_npc",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
{
"__id__": 73
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 124,
"height": 136
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
850.23,
443.913,
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": "60CBeDhRNGerR0ogorUCw1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "24bacd99-16bc-499a-9c70-be9ccfeea10e"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a6OdIbqlxBNaftQguyOArn"
},
{
"__type__": "cc.Node",
"_name": "ani_npc",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 75
},
{
"__id__": 7
4
"__id__": 7
6
}
],
"_prefab": null,
...
...
@@ -3517,7 +3614,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
4
},
"_enabled": true,
"_materials": [
...
...
@@ -3557,7 +3654,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
2
"__id__": 7
4
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -3629,19 +3726,19 @@
},
"_children": [
{
"__id__": 7
6
"__id__": 7
8
},
{
"__id__": 10
4
"__id__": 10
6
},
{
"__id__": 10
6
"__id__": 10
8
}
],
"_active": true,
"_components": [
{
"__id__": 1
08
"__id__": 1
10
}
],
"_prefab": null,
...
...
@@ -3697,17 +3794,17 @@
"_name": "layout_cover",
"_objFlags": 0,
"_parent": {
"__id__": 7
5
"__id__": 7
7
},
"_children": [
{
"__id__": 7
7
"__id__": 7
9
}
],
"_active": true,
"_components": [
{
"__id__": 10
3
"__id__": 10
5
}
],
"_prefab": null,
...
...
@@ -3763,23 +3860,23 @@
"_name": "btn_record",
"_objFlags": 0,
"_parent": {
"__id__": 7
6
"__id__": 7
8
},
"_children": [
{
"__id__":
78
"__id__":
80
},
{
"__id__": 9
1
"__id__": 9
3
},
{
"__id__": 9
5
"__id__": 9
7
}
],
"_active": true,
"_components": [
{
"__id__": 10
2
"__id__": 10
4
}
],
"_prefab": null,
...
...
@@ -3835,17 +3932,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
9
},
"_children": [
{
"__id__":
79
"__id__":
81
}
],
"_active": true,
"_components": [
{
"__id__": 9
0
"__id__": 9
2
}
],
"_prefab": null,
...
...
@@ -3901,23 +3998,23 @@
"_name": "layout_btns",
"_objFlags": 0,
"_parent": {
"__id__":
78
"__id__":
80
},
"_children": [
{
"__id__": 8
0
"__id__": 8
2
},
{
"__id__": 8
3
"__id__": 8
5
},
{
"__id__": 8
6
"__id__": 8
8
}
],
"_active": true,
"_components": [
{
"__id__":
89
"__id__":
91
}
],
"_prefab": null,
...
...
@@ -3973,16 +4070,16 @@
"_name": "btn_right",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
81
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
1
"__id__": 8
3
},
{
"__id__": 8
2
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -4038,7 +4135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
0
"__id__": 8
2
},
"_enabled": true,
"_materials": [
...
...
@@ -4070,7 +4167,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
0
"__id__": 8
2
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4138,16 +4235,16 @@
"_name": "btn_play",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
81
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 8
4
"__id__": 8
6
},
{
"__id__": 8
5
"__id__": 8
7
}
],
"_prefab": null,
...
...
@@ -4203,7 +4300,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
3
"__id__": 8
5
},
"_enabled": true,
"_materials": [
...
...
@@ -4235,7 +4332,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
3
"__id__": 8
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4303,16 +4400,16 @@
"_name": "btn_stop",
"_objFlags": 0,
"_parent": {
"__id__":
79
"__id__":
81
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 8
7
"__id__": 8
9
},
{
"__id__":
88
"__id__":
90
}
],
"_prefab": null,
...
...
@@ -4368,7 +4465,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
6
"__id__": 8
8
},
"_enabled": true,
"_materials": [
...
...
@@ -4400,7 +4497,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
6
"__id__": 8
8
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4468,7 +4565,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
79
"__id__":
81
},
"_enabled": true,
"_materials": [
...
...
@@ -4500,7 +4597,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
78
"__id__":
80
},
"_enabled": true,
"_materials": [
...
...
@@ -4520,17 +4617,17 @@
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
9
},
"_children": [
{
"__id__": 9
2
"__id__": 9
4
}
],
"_active": true,
"_components": [
{
"__id__": 9
4
"__id__": 9
6
}
],
"_prefab": null,
...
...
@@ -4586,13 +4683,13 @@
"_name": "ani",
"_objFlags": 0,
"_parent": {
"__id__": 9
1
"__id__": 9
3
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
3
"__id__": 9
5
}
],
"_prefab": null,
...
...
@@ -4648,7 +4745,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
2
"__id__": 9
4
},
"_enabled": true,
"_materials": [
...
...
@@ -4688,7 +4785,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
1
"__id__": 9
3
},
"_enabled": true,
"_materials": [
...
...
@@ -4720,23 +4817,23 @@
"_name": "img_voice",
"_objFlags": 0,
"_parent": {
"__id__": 7
7
"__id__": 7
9
},
"_children": [
{
"__id__": 9
6
"__id__": 9
8
},
{
"__id__": 9
7
"__id__": 9
9
},
{
"__id__":
99
"__id__":
101
}
],
"_active": false,
"_components": [
{
"__id__": 10
1
"__id__": 10
3
}
],
"_prefab": null,
...
...
@@ -4792,7 +4889,7 @@
"_name": "p1",
"_objFlags": 0,
"_parent": {
"__id__": 9
5
"__id__": 9
7
},
"_children": [],
"_active": true,
...
...
@@ -4850,13 +4947,13 @@
"_name": "p2",
"_objFlags": 0,
"_parent": {
"__id__": 9
5
"__id__": 9
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__":
98
"__id__":
100
}
],
"_prefab": null,
...
...
@@ -4912,7 +5009,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
7
"__id__": 9
9
},
"_enabled": true,
"_materials": [
...
...
@@ -4944,13 +5041,13 @@
"_name": "p3",
"_objFlags": 0,
"_parent": {
"__id__": 9
5
"__id__": 9
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
0
"__id__": 10
2
}
],
"_prefab": null,
...
...
@@ -5006,7 +5103,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
99
"__id__":
101
},
"_enabled": true,
"_materials": [
...
...
@@ -5038,7 +5135,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
5
"__id__": 9
7
},
"_enabled": true,
"_id": "1b37Xp6IVLg6RciXLxM7OU"
...
...
@@ -5048,7 +5145,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
7
"__id__": 7
9
},
"_enabled": true,
"alignMode": 2,
...
...
@@ -5075,7 +5172,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
6
"__id__": 7
8
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -5102,13 +5199,13 @@
"_name": "label_word",
"_objFlags": 0,
"_parent": {
"__id__": 7
5
"__id__": 7
7
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 10
5
"__id__": 10
7
}
],
"_prefab": null,
...
...
@@ -5164,7 +5261,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
4
"__id__": 10
6
},
"_enabled": true,
"_materials": [
...
...
@@ -5199,13 +5296,13 @@
"_name": "ani_good",
"_objFlags": 0,
"_parent": {
"__id__": 7
5
"__id__": 7
7
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 10
7
"__id__": 10
9
}
],
"_prefab": null,
...
...
@@ -5261,7 +5358,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
6
"__id__": 10
8
},
"_enabled": true,
"_materials": [
...
...
@@ -5301,7 +5398,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
5
"__id__": 7
7
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -5334,7 +5431,7 @@
"_active": true,
"_components": [
{
"__id__": 11
0
"__id__": 11
2
}
],
"_prefab": null,
...
...
@@ -5390,7 +5487,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
09
"__id__": 1
11
},
"_enabled": true,
"_materials": [
...
...
@@ -5428,7 +5525,7 @@
"_active": true,
"_components": [
{
"__id__": 11
2
"__id__": 11
4
}
],
"_prefab": null,
...
...
@@ -5484,7 +5581,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
1
"__id__": 11
3
},
"_enabled": true,
"_materials": [
...
...
@@ -5520,13 +5617,13 @@
},
"_children": [
{
"__id__": 11
4
"__id__": 11
6
},
{
"__id__": 11
7
"__id__": 11
9
},
{
"__id__": 12
0
"__id__": 12
2
}
],
"_active": false,
...
...
@@ -5584,11 +5681,11 @@
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 11
3
"__id__": 11
5
},
"_children": [
{
"__id__": 11
5
"__id__": 11
7
}
],
"_active": true,
...
...
@@ -5646,13 +5743,13 @@
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 11
4
"__id__": 11
6
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
6
"__id__": 11
8
}
],
"_prefab": null,
...
...
@@ -5708,7 +5805,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
5
"__id__": 11
7
},
"_enabled": true,
"_materials": [],
...
...
@@ -5739,11 +5836,11 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 11
3
"__id__": 11
5
},
"_children": [
{
"__id__": 1
18
"__id__": 1
20
}
],
"_active": true,
...
...
@@ -5801,13 +5898,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 11
7
"__id__": 11
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
19
"__id__": 1
21
}
],
"_prefab": null,
...
...
@@ -5863,7 +5960,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
18
"__id__": 1
20
},
"_enabled": true,
"_materials": [],
...
...
@@ -5891,12 +5988,9 @@
"_name": "audio",
"_objFlags": 0,
"_parent": {
"__id__": 11
3
"__id__": 11
5
},
"_children": [
{
"__id__": 121
},
{
"__id__": 123
},
...
...
@@ -5911,6 +6005,9 @@
},
{
"__id__": 131
},
{
"__id__": 133
}
],
"_active": true,
...
...
@@ -5968,13 +6065,13 @@
"_name": "btn",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
2
"__id__": 12
4
}
],
"_prefab": null,
...
...
@@ -6030,7 +6127,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
1
"__id__": 12
3
},
"_enabled": true,
"_clip": {
...
...
@@ -6049,13 +6146,13 @@
"_name": "tip",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
4
"__id__": 12
6
}
],
"_prefab": null,
...
...
@@ -6111,7 +6208,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
3
"__id__": 12
5
},
"_enabled": true,
"_clip": {
...
...
@@ -6130,13 +6227,13 @@
"_name": "tosmall",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
6
"__id__": 12
8
}
],
"_prefab": null,
...
...
@@ -6192,7 +6289,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
5
"__id__": 12
7
},
"_enabled": true,
"_clip": {
...
...
@@ -6211,13 +6308,13 @@
"_name": "pagenext",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 1
28
"__id__": 1
30
}
],
"_prefab": null,
...
...
@@ -6273,7 +6370,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
7
"__id__": 12
9
},
"_enabled": true,
"_clip": {
...
...
@@ -6292,13 +6389,13 @@
"_name": "arrow",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
0
"__id__": 13
2
}
],
"_prefab": null,
...
...
@@ -6354,7 +6451,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
29
"__id__": 1
31
},
"_enabled": true,
"_clip": {
...
...
@@ -6373,13 +6470,13 @@
"_name": "right",
"_objFlags": 0,
"_parent": {
"__id__": 12
0
"__id__": 12
2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
2
"__id__": 13
4
}
],
"_prefab": null,
...
...
@@ -6435,7 +6532,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
1
"__id__": 13
3
},
"_enabled": true,
"_clip": {
...
...
@@ -6511,18 +6608,21 @@
"__id__": 59
},
"btn_record": {
"__id__": 7
7
"__id__": 7
9
},
"layer_touch": {
"__id__": 15
},
"label_word": {
"__id__": 10
4
"__id__": 10
6
},
"ani_good": {
"__id__": 10
6
"__id__": 10
8
},
"ani_npc": {
"__id__": 74
},
"img_npc": {
"__id__": 72
},
"btn_last": {
...
...
assets/sn19_read/scene/sn19_read.ts
View file @
ddede972
...
...
@@ -76,6 +76,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
scoreList
=
this
.
list
.
map
(()
=>
3
);
this
.
maxCurrent
=
0
;
this
.
layers
=
[];
this
.
readyNext
=
false
;
this
.
readyTime
=
99999
;
}
private
layers
:
Array
<
cc
.
Node
>
;
...
...
@@ -91,6 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
touchOn
(
this
.
btn_last
,
this
.
preLayer
,
this
);
pg
.
view
.
touchOn
(
this
.
btn_next
,
this
.
nextLayer
,
this
);
pg
.
view
.
touchOn
(
this
.
btn_record
,
this
.
onTouchRecord
,
this
);
pg
.
view
.
touchOn
(
this
.
img_npc
,
this
.
onPlayNpc
,
this
);
pg
.
view
.
touchOn
(
this
.
ani_npc
,
this
.
onPlayNpc
,
this
);
let
layout_btns
=
pg
.
view
.
find
(
this
.
btn_record
,
"
mask/layout_btns
"
);
...
...
@@ -171,9 +174,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
btn_last
.
active
=
this
.
showLastNext
>
0
&&
!!
this
.
LastData
;
this
.
btn_next
.
active
=
this
.
showLastNext
>
0
&&
!!
this
.
NextData
;
}
private
readyNext
:
boolean
;
private
readyTime
:
number
;
update
(
dt
)
{
if
(
!
this
.
list
)
return
;
this
.
updateBtns
(
dt
);
this
.
readyTime
-=
dt
;
if
(
this
.
readyNext
&&
this
.
readyTime
<=
0
)
{
this
.
readyNext
=
false
;
this
.
readyTime
=
999999
;
this
.
nextLayer
();
}
}
//--------------------------------Record-----------------------------
private
recordAudio
:
string
;
...
...
@@ -205,6 +216,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
showRecordHide
()
{
this
.
showRecordWaitEnd
();
this
.
img_npc
.
active
=
false
;
this
.
showLastNext
=
3
;
// 3秒显示时间
let
img_voice
=
pg
.
view
.
find
(
this
.
btn_record
,
"
img_voice
"
);
img_voice
.
active
=
false
;
...
...
@@ -252,6 +264,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
recordAudioId
:
any
;
async
showRecorAudioPlay
()
{
if
(
!
this
.
recordAudio
)
return
;
this
.
readyNext
=
false
;
this
.
readyTime
=
999999
;
let
layout_btns
=
pg
.
view
.
find
(
this
.
btn_record
,
"
mask/layout_btns
"
);
let
btn_right
=
pg
.
view
.
find
(
layout_btns
,
'
btn_right
'
)
...
...
@@ -266,7 +280,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showRecorAudioPlayEnd
().
then
(()
=>
{
this
.
showNpcAudioPlay
().
then
(()
=>
{
this
.
showNpcAudioPlayEnd
();
this
.
nextLayer
();
this
.
readyNext
=
true
;
this
.
readyTime
=
3
;
})
})
},
audioId
=>
{
...
...
@@ -311,13 +326,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
ani_good
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
ani_npc
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
img_npc
:
cc
.
Node
=
null
;
private
npcAudioId
:
any
;
showNpcAudioPlay
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
ani_npc
.
active
=
true
;
this
.
img_npc
.
active
=
false
;
pg
.
view
.
playDBAnimation
(
this
.
ani_npc
,
'
newAnimation
'
,
0
);
pg
.
audio
.
playAudioByUrl
(
this
.
CurrentData
.
npcAudio
,
()
=>
{
pg
.
view
.
playDBAnimation
(
this
.
ani_npc
,
'
newAnimation
'
,
1
);
this
.
ani_npc
.
active
=
false
;
this
.
img_npc
.
active
=
true
;
this
.
npcAudioId
=
null
;
resolve
(
''
);
},
audioId
=>
{
...
...
@@ -339,10 +359,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
// 停止播放录音
onTouchRecordStop
()
{
this
.
readyNext
=
false
;
this
.
readyTime
=
999999
;
this
.
showRecorAudioPlayEnd
().
then
(()
=>
{
this
.
showNpcAudioPlay
().
then
(()
=>
{
this
.
showNpcAudioPlayEnd
();
this
.
nextLayer
();
this
.
readyNext
=
true
;
this
.
readyTime
=
3
;
})
})
}
...
...
@@ -352,10 +375,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showRecorAudioPlay
();
}
onPlayNpc
()
{
this
.
readyNext
=
false
;
this
.
readyTime
=
999999
;
this
.
showNpcAudioPlayEnd
();
this
.
showNpcAudioPlay
().
then
(()
=>
{
this
.
showNpcAudioPlayEnd
();
this
.
nextLayer
();
this
.
readyNext
=
true
;
this
.
readyTime
=
3
;
})
}
//按钮触发,使用的方法
...
...
@@ -378,7 +404,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showRecordEnd
();
let
testData
=
{
"
text
"
:
"
Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.Yes, there is.
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav
"
"
audio
Url
"
:
"
https://staging-teach.cdn.ireadabc.com/6ee3ccaa831a884f02c6a75c6f647cb5.wav
"
}
if
(
!
courseware
)
return
this
.
recrodEnd
(
testData
)
courseware
&&
courseware
.
stopRecord
(
0
,
(
data
)
=>
{
...
...
@@ -389,7 +415,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
async
recrodEnd
(
data
)
{
this
.
voiceTouchForbid
=
false
;
this
.
recordAudio
=
data
.
audio
;
this
.
recordAudio
=
data
.
audio
Url
;
this
.
recordAudioWord
=
data
.
text
;
this
.
recording
=
false
;
this
.
showRecorAudioPlay
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment