Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_01
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_01
Commits
873ba418
Commit
873ba418
authored
Sep 25, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 结尾 音频
parent
5fd800fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
op_01.js
play/assets/op_01/scene/op_01.js
+8
-4
No files found.
play/assets/op_01/scene/op_01.js
View file @
873ba418
...
@@ -166,6 +166,7 @@ cc.Class({
...
@@ -166,6 +166,7 @@ cc.Class({
.
start
();
.
start
();
},
},
coolCatAlreadySpeakEnd
:
null
,
async
createItem
(
itemData
,
bg
)
{
async
createItem
(
itemData
,
bg
)
{
const
bgScale
=
bg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
;
const
bgScale
=
bg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
;
...
@@ -176,10 +177,13 @@ cc.Class({
...
@@ -176,10 +177,13 @@ cc.Class({
item
.
clicked
=
true
;
item
.
clicked
=
true
;
this
.
shakeItem
(
item
);
this
.
shakeItem
(
item
);
await
this
.
asyncPlayAudioByUrl
(
itemData
.
audio_url
);
await
this
.
asyncPlayAudioByUrl
(
itemData
.
audio_url
);
if
(
this
.
itemList
.
every
(
tmpItem
=>
tmpItem
.
clicked
))
{
if
(
!
this
.
coolCatAlreadySpeakEnd
)
{
await
asyncDelay
(
0.3
);
if
(
this
.
itemList
.
every
(
tmpItem
=>
tmpItem
.
clicked
))
{
await
this
.
coolCatSpeakEnd
();
this
.
coolCatAlreadySpeakEnd
=
true
;
onHomeworkFinish
();
await
asyncDelay
(
0.3
);
await
this
.
coolCatSpeakEnd
();
onHomeworkFinish
();
}
}
}
});
});
...
...
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