Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy01_danci
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
hy01_danci
Commits
d00d1152
Commit
d00d1152
authored
Jul 01, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回api增加
parent
bc2d5f08
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
11 deletions
+34
-11
LayerBack_hy01_danci.ts
assets/hy01_danci/common/script/LayerBack_hy01_danci.ts
+3
-1
hy01_danci.fire
assets/hy01_danci/scene/hy01_danci.fire
+2
-2
hy01_danci.ts
assets/hy01_danci/scene/hy01_danci.ts
+9
-2
defaultData_hy01_danci.ts
assets/hy01_danci/script/defaultData_hy01_danci.ts
+20
-6
No files found.
assets/hy01_danci/common/script/LayerBack_hy01_danci.ts
View file @
d00d1152
...
@@ -54,7 +54,9 @@ export default class LayerBack extends cc.Component {
...
@@ -54,7 +54,9 @@ export default class LayerBack extends cc.Component {
p3
.
active
=
false
;
p3
.
active
=
false
;
}
}
onTouchBack
()
{
onTouchBack
()
{
alert
(
'
back
'
)
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
exitGame
();
}
}
}
}
assets/hy01_danci/scene/hy01_danci.fire
View file @
d00d1152
...
@@ -1847,8 +1847,8 @@
...
@@ -1847,8 +1847,8 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-7
4
5,
-7
73.87
5,
19.629
,
80.776
,
0,
0,
0,
0,
0,
0,
...
...
assets/hy01_danci/scene/hy01_danci.ts
View file @
d00d1152
...
@@ -15,7 +15,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -15,7 +15,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio
()
{
addPreloadAudio
()
{
// TODO 根据自己的配置预加载音频资源
// TODO 根据自己的配置预加载音频资源
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
questionTextAudio
});
this
.
data
.
questions
.
forEach
(
question
=>
{
question
.
options
.
forEach
(
option
=>
{
this
.
_audioResList
.
push
({
url
:
option
.
audio
})
})
})
}
}
addPreloadAnima
()
{
addPreloadAnima
()
{
...
@@ -99,7 +104,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -99,7 +104,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
event
.
emit
(
'
img_voice_play_voice_start
'
)
pg
.
event
.
emit
(
'
img_voice_play_voice_start
'
)
pg
.
audio
.
playAudioByUrl
(
this
.
CurrentData
.
audio
,
()
=>
{
pg
.
audio
.
playAudioByUrl
(
this
.
CurrentData
.
audio
,
()
=>
{
pg
.
event
.
emit
(
'
img_voice_play_voice_end
'
)
pg
.
event
.
emit
(
'
img_voice_play_voice_end
'
)
this
.
nextLayer
();
this
.
scheduleOnce
(()
=>
{
this
.
nextLayer
();
},
2
)
})
})
}
}
}
}
...
...
assets/hy01_danci/script/defaultData_hy01_danci.ts
View file @
d00d1152
export
const
defaultData
=
export
const
defaultData
=
{
{
"
recordFlag
"
:
tru
e
,
"
recordFlag
"
:
fals
e
,
"
title
"
:
"
test
"
,
"
title
"
:
"
test
"
,
"
audio_url
"
:
''
,
"
questionText
"
:
""
,
"
questionText
"
:
""
,
"
questionTextAudio
"
:
""
,
"
questionTextAudio
"
:
""
,
"
questions
"
:
[
"
questions
"
:
[
{
{
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
questionAudio
"
:
""
,
"
duration
"
:
120
,
"
options
"
:
[
"
options
"
:
[
{
"
type
"
:
"
img_audio
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/875862129c75a075b3d710f541258a00.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
""
,
"
duration
"
:
10
,
"
content
"
:
"
egg
"
,
"
right
"
:
false
},
{
{
"
type
"
:
"
img_txt_audio
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/011cf423d6fd8760e810644ca6070e34.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
"
hammer
"
,
"
duration
"
:
10
,
"
content
"
:
"
hammer
"
,
"
right
"
:
false
},
"
type
"
:
"
img_audio
"
,
{
"
type
"
:
"
img_txt_audio
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/befdc1801d93fd95b3a8ee7c7a2d2d05.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
"
clound
"
,
"
duration
"
:
10
,
"
content
"
:
"
clound
"
,
"
right
"
:
false
,
"
audioName
"
:
"
敲碎蛋的声音.mp3
"
}]
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/875862129c75a075b3d710f541258a00.png
"
,
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
""
,
"
duration
"
:
10
,
"
content
"
:
"
egg
"
,
"
right
"
:
false
},
{
"
type
"
:
"
img_txt_audio
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/011cf423d6fd8760e810644ca6070e34.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
"
hammer
"
,
"
duration
"
:
10
,
"
content
"
:
"
hammer
"
,
"
right
"
:
false
},
{
"
type
"
:
"
img_txt_audio
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/befdc1801d93fd95b3a8ee7c7a2d2d05.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/43839adb578c7e01456748b8a176a0c3_l.mp3
"
,
"
text
"
:
"
clound
"
,
"
duration
"
:
10
,
"
content
"
:
"
clound
"
,
"
right
"
:
false
,
"
audioName
"
:
"
敲碎蛋的声音.mp3
"
}]
}],
"
bgAudio
"
:
""
,
"
bgAudioName
"
:
""
,
"
audioName
"
:
""
}
}
// {
// {
// "recordFlag": true,
// "recordFlag": true,
...
...
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