Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_09
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
op_09
Commits
a0a06131
Commit
a0a06131
authored
Sep 18, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 问题语音
parent
1334df83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
op_09.js
play/assets/op_09/scene/op_09.js
+12
-5
No files found.
play/assets/op_09/scene/op_09.js
View file @
a0a06131
...
...
@@ -152,10 +152,7 @@ cc.Class({
initView
()
{
this
.
refreshCoolCatPosition
();
this
.
coolCatSpeakStart
(()
=>
{
const
audioUrl
=
this
.
data
.
question_arr
[
this
.
status
.
currentQuestionIdx
].
question_audio_url
;
this
.
playAudioByUrl
(
audioUrl
,
()
=>
{
this
.
jumpToQuestion
(
this
.
status
.
currentQuestionIdx
);
});
this
.
jumpToQuestion
(
this
.
status
.
currentQuestionIdx
);
});
},
...
...
@@ -167,10 +164,20 @@ cc.Class({
console
.
log
(
'
canvasWidth =
'
+
canvasWidth
);
console
.
log
(
'
canvasHeight =
'
+
canvasHeight
);
let
monster
=
100
;
let
hero
=
100
;
setInterval
(()
=>
{
monster
=
monster
*
1.05
;
hero
=
hero
+
5
;
console
.
log
(
Math
.
round
(
monster
*
100
)
/
100
);
console
.
log
(
Math
.
round
(
hero
*
100
)
/
100
);
},
1000
);
},
jumpToQuestion
(
questionIdx
)
{
const
audioUrl
=
this
.
data
.
question_arr
[
questionIdx
].
question_audio_url
;
this
.
playAudioByUrl
(
audioUrl
);
const
box
=
cc
.
find
(
'
Canvas/bg/box
'
);
box
.
removeAllChildren
();
...
...
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