Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Coloring_OL
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
Coloring_OL
Commits
036d75ad
Commit
036d75ad
authored
Sep 07, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 预加载
parent
a423eabe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
Coloring_OL.js
assets/Coloring_OL/scene/Coloring_OL.js
+48
-0
No files found.
assets/Coloring_OL/scene/Coloring_OL.js
View file @
036d75ad
...
@@ -367,6 +367,54 @@ cc.Class({
...
@@ -367,6 +367,54 @@ cc.Class({
},
},
preloadItem
()
{
preloadItem
()
{
if
(
this
.
data
.
startAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
startAudio
);
}
if
(
this
.
data
.
waitAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
waitAudio
);
}
if
(
this
.
data
.
finishAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
finishAudio
);
}
if
(
this
.
data
.
finishWaitAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
finishWaitAudio
);
}
if
(
this
.
data
.
rightAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
rightAudio
);
}
if
(
this
.
data
.
wrongAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
wrongAudio
);
}
if
(
this
.
data
.
smileAudio
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio
);
}
if
(
this
.
data
.
smileAudio_1
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_1
);
}
if
(
this
.
data
.
smileAudio_2
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_2
);
}
if
(
this
.
data
.
smileAudio_3
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_3
);
}
if
(
this
.
data
.
smileAudio_4
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_4
);
}
if
(
this
.
data
.
smileAudio_5
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_5
);
}
if
(
this
.
data
.
smileAudio_6
)
{
this
.
_audioResList
.
push
(
this
.
data
.
smileAudio_6
);
}
if
(
this
.
data
.
bg
)
{
this
.
_imageResList
.
push
(
this
.
data
.
bg
);
}
for
(
let
i
=
0
;
i
<
this
.
data
.
images
.
length
;
i
++
)
{
this
.
_imageResList
.
push
(
this
.
data
.
images
[
i
].
img
);
}
this
.
preload
();
this
.
preload
();
},
},
...
...
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