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
fe4733f9
Commit
fe4733f9
authored
Nov 13, 2023
by
Tt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://vcs.ireadabc.com/template/sn19_read
parents
e4471bfd
04baffd0
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
61 additions
and
32 deletions
+61
-32
.DS_Store
.DS_Store
+0
-0
sn19_read.ts
assets/sn19_read/scene/sn19_read.ts
+38
-9
bg_1_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_1_sn19_read.png.meta
+1
-1
bg_2_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_2_sn19_read.png.meta
+1
-1
bg_3_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_3_sn19_read.png.meta
+1
-1
bg_again_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_again_sn19_read.png.meta
+1
-1
bg_bg_sn19_read.jpg.meta
assets/sn19_read/textures/sn19/bg_bg_sn19_read.jpg.meta
+1
-1
bg_bottom_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_bottom_sn19_read.png.meta
+1
-1
bg_mic_bg_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_mic_bg_sn19_read.png.meta
+1
-1
bg_nopageturns_sn19_read.png.meta
...sn19_read/textures/sn19/bg_nopageturns_sn19_read.png.meta
+1
-1
bg_nopic_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_nopic_sn19_read.png.meta
+1
-1
bg_number_sn19_read.png.meta
assets/sn19_read/textures/sn19/bg_number_sn19_read.png.meta
+1
-1
btn_laba_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_laba_sn19_read.png.meta
+1
-1
btn_last_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_last_sn19_read.png.meta
+1
-1
btn_mic_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_mic_sn19_read.png.meta
+1
-1
btn_next_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_next_sn19_read.png.meta
+1
-1
btn_play_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_play_sn19_read.png.meta
+1
-1
btn_recorddone_sn19_read.png.meta
...sn19_read/textures/sn19/btn_recorddone_sn19_read.png.meta
+1
-1
btn_stop_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_stop_sn19_read.png.meta
+1
-1
btn_tip_sn19_read.png.meta
assets/sn19_read/textures/sn19/btn_tip_sn19_read.png.meta
+1
-1
icon_laba2_sn19_read.png.meta
assets/sn19_read/textures/sn19/icon_laba2_sn19_read.png.meta
+1
-1
icon_laba3_sn19_read.png.meta
assets/sn19_read/textures/sn19/icon_laba3_sn19_read.png.meta
+1
-1
icon_laba_sn19_read.png.meta
assets/sn19_read/textures/sn19/icon_laba_sn19_read.png.meta
+1
-1
icon_recording1_sn19_read.png.meta
...n19_read/textures/sn19/icon_recording1_sn19_read.png.meta
+1
-1
icon_recording2_sn19_read.png.meta
...n19_read/textures/sn19/icon_recording2_sn19_read.png.meta
+1
-1
No files found.
.DS_Store
View file @
fe4733f9
No preview for this file type
assets/sn19_read/scene/sn19_read.ts
View file @
fe4733f9
...
...
@@ -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
>
;
...
...
@@ -92,6 +94,8 @@ 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
(
pg
.
view
.
find
(
this
.
btn_record
,
'
bg
'
),
this
.
onTouchRecord
,
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
"
);
...
...
@@ -172,9 +176,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
;
...
...
@@ -206,6 +218,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
;
...
...
@@ -254,6 +267,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
showRecorAudioPlay
()
{
if
(
!
this
.
recordAudio
)
return
;
this
.
touchForbid
=
false
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
'
)
...
...
@@ -270,7 +285,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
showNpcAudioPlay
().
then
(()
=>
{
if
(
this
.
recording
)
return
;
this
.
showNpcAudioPlayEnd
();
this
.
nextLayer
();
this
.
readyNext
=
true
;
this
.
readyTime
=
3
;
})
})
},
audioId
=>
{
...
...
@@ -321,6 +337,8 @@ 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
()
{
...
...
@@ -329,9 +347,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
resolve
(
''
);
}
this
.
CurrentData
.
npcPlay
=
true
;
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
=>
{
...
...
@@ -355,10 +376,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
onTouchRecordStop
()
{
this
.
showRecorAudioPlayEnd
(
false
).
then
(()
=>
{
if
(
this
.
recording
)
return
;
this
.
showNpcAudioPlay
().
then
(()
=>
{
if
(
this
.
recording
)
return
;
this
.
showNpcAudioPlayEnd
();
this
.
nextLayer
();
this
.
readyNext
=
false
;
this
.
readyTime
=
999999
;
this
.
showRecorAudioPlayEnd
(
false
).
then
(()
=>
{
this
.
showNpcAudioPlay
().
then
(()
=>
{
if
(
this
.
recording
)
return
;
this
.
showNpcAudioPlayEnd
();
this
.
readyNext
=
true
;
this
.
readyTime
=
3
;
})
})
})
}
...
...
@@ -368,10 +394,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
;
})
}
//按钮触发,使用的方法
...
...
@@ -396,7 +425,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
)
=>
{
...
...
@@ -407,7 +436,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
;
if
(
!
this
.
recordAudioWord
)
{
...
...
assets/sn19_read/textures/sn19/bg_1_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 1065,
...
...
assets/sn19_read/textures/sn19/bg_2_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 1372,
...
...
assets/sn19_read/textures/sn19/bg_3_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 1270,
...
...
assets/sn19_read/textures/sn19/bg_again_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 592,
...
...
assets/sn19_read/textures/sn19/bg_bg_sn19_read.jpg.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 1920,
...
...
assets/sn19_read/textures/sn19/bg_bottom_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 1920,
...
...
assets/sn19_read/textures/sn19/bg_mic_bg_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 316,
...
...
assets/sn19_read/textures/sn19/bg_nopageturns_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 478,
...
...
assets/sn19_read/textures/sn19/bg_nopic_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 443,
...
...
assets/sn19_read/textures/sn19/bg_number_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 165,
...
...
assets/sn19_read/textures/sn19/btn_laba_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 177,
...
...
assets/sn19_read/textures/sn19/btn_last_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 103,
...
...
assets/sn19_read/textures/sn19/btn_mic_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 189,
...
...
assets/sn19_read/textures/sn19/btn_next_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 103,
...
...
assets/sn19_read/textures/sn19/btn_play_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 110,
...
...
assets/sn19_read/textures/sn19/btn_recorddone_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 110,
...
...
assets/sn19_read/textures/sn19/btn_stop_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 110,
...
...
assets/sn19_read/textures/sn19/btn_tip_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 132,
...
...
assets/sn19_read/textures/sn19/icon_laba2_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 177,
...
...
assets/sn19_read/textures/sn19/icon_laba3_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 177,
...
...
assets/sn19_read/textures/sn19/icon_laba_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 177,
...
...
assets/sn19_read/textures/sn19/icon_recording1_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 59,
...
...
assets/sn19_read/textures/sn19/icon_recording2_sn19_read.png.meta
View file @
fe4733f9
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 59,
...
...
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