Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FT_06
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
FT_06
Commits
debc3faf
Commit
debc3faf
authored
Dec 21, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 点第一页点任意处标题和题干一起发音了
parent
6b2cf5ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
utils.js
play/assets/tmpGame/script/utils.js
+6
-8
No files found.
play/assets/tmpGame/script/utils.js
View file @
debc3faf
...
@@ -109,17 +109,15 @@ export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1
...
@@ -109,17 +109,15 @@ export async function asyncPlayDragonBoneAnimation(node, animationName, time = 1
}
}
export
async
function
asyncPlayEffectByUrl
(
url
,
loop
=
false
)
{
export
async
function
asyncPlayEffectByUrl
(
url
,
loop
=
false
)
{
if
(
!
url
)
{
return
;
}
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
clip
)
=>
{
cc
.
assetManager
.
loadRemote
(
url
,
(
err
,
clip
)
=>
{
cc
.
audioEngine
.
playEffect
(
clip
,
loop
);
if
(
!
clip
)
{
return
;
setTimeout
(()
=>
{
}
const
audioID
=
cc
.
audioEngine
.
playEffect
(
clip
,
loop
);
cc
.
audioEngine
.
setFinishCallback
(
audioID
,
function
()
{
resolve
();
resolve
();
},
clip
.
duration
*
1000
);
});
});
});
});
});
}
}
...
...
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