Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbx_pageturn
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
Sbx_pageturn
Commits
5355dab9
Commit
5355dab9
authored
Jan 24, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
c30f1a6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ItemPage.js
assets/Sbx_pageturn/script/ItemPage.js
+3
-2
No files found.
assets/Sbx_pageturn/script/ItemPage.js
View file @
5355dab9
...
@@ -229,12 +229,12 @@ cc.Class({
...
@@ -229,12 +229,12 @@ cc.Class({
cc
.
assetManager
.
loadRemote
(
this
.
data
.
shortAudio_url
,
null
,
async
(
err
,
clip
)
=>
{
cc
.
assetManager
.
loadRemote
(
this
.
data
.
shortAudio_url
,
null
,
async
(
err
,
clip
)
=>
{
this
.
audioID
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
this
.
audioID
=
cc
.
audioEngine
.
play
(
clip
,
false
,
1
);
await
asyncDelay
(
0.01
);
await
this
.
asyncDelay
(
0.01
);
this
.
audioDuration
=
cc
.
audioEngine
.
getDuration
(
this
.
audioID
);
this
.
audioDuration
=
cc
.
audioEngine
.
getDuration
(
this
.
audioID
);
this
.
textDuration
=
this
.
audioDuration
/
this
.
layoutText
.
childrenCount
;
this
.
textDuration
=
this
.
audioDuration
/
this
.
layoutText
.
childrenCount
;
this
.
textIndex
=
0
;
this
.
textIndex
=
0
;
await
asyncDelay
(
0.01
);
await
this
.
asyncDelay
(
0.01
);
if
(
this
.
textDuration
<=
0
)
{
if
(
this
.
textDuration
<=
0
)
{
this
.
textDuration
=
1
this
.
textDuration
=
1
}
}
...
@@ -242,6 +242,7 @@ cc.Class({
...
@@ -242,6 +242,7 @@ cc.Class({
this
.
schedule
(
this
.
chengeTextColor
,
this
.
textDuration
,
this
.
layoutText
.
childrenCount
,
0.01
)
this
.
schedule
(
this
.
chengeTextColor
,
this
.
textDuration
,
this
.
layoutText
.
childrenCount
,
0.01
)
});
});
},
},
stopAudio
()
{
stopAudio
()
{
cc
.
audioEngine
.
stop
(
this
.
audioID
);
cc
.
audioEngine
.
stop
(
this
.
audioID
);
this
.
unschedule
(
this
.
chengeTextColor
);
this
.
unschedule
(
this
.
chengeTextColor
);
...
...
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