Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_BookTable
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
NJ_BookTable
Commits
fb7ad368
Commit
fb7ad368
authored
Aug 01, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
9225c44a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
NJ_BookTable.ts
assets/NJ_BookTable/scene/NJ_BookTable.ts
+1
-0
util.ts
assets/NJ_BookTable/script/util.ts
+1
-0
No files found.
assets/NJ_BookTable/scene/NJ_BookTable.ts
View file @
fb7ad368
...
@@ -22,6 +22,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -22,6 +22,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
onLoadEnd
()
{
async
onLoadEnd
()
{
await
this
.
initView
();
await
this
.
initView
();
this
.
initListener
();
this
.
initListener
();
playAudioByUrl
(
this
.
data
.
questionTextAudio
);
}
}
rows
=
[];
rows
=
[];
...
...
assets/NJ_BookTable/script/util.ts
View file @
fb7ad368
...
@@ -102,6 +102,7 @@ export function getDistance(start, end) {
...
@@ -102,6 +102,7 @@ export function getDistance(start, end) {
export
function
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
export
function
playAudioByUrl
(
audio_url
,
cb
=
null
)
{
if
(
audio_url
)
{
if
(
audio_url
)
{
cc
.
audioEngine
.
stopAll
();
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
if
(
cb
)
{
if
(
cb
)
{
...
...
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