Commit 86952d02 authored by Tt's avatar Tt

预加载内容去除

parent 8e5c4ee1
......@@ -21,18 +21,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
let audios = [];
function checkAudio(obj) {
for (let idx in obj) {
if (typeof obj[idx] == "object") {
checkAudio(obj[idx]);
} else if (typeof obj[idx] == "string") {
if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
}
}
}
checkAudio(this.data)
this._audioResList = audios;
// let audios = [];
// function checkAudio(obj) {
// for (let idx in obj) {
// if (typeof obj[idx] == "object") {
// checkAudio(obj[idx]);
// } else if (typeof obj[idx] == "string") {
// if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
// }
// }
// }
// checkAudio(this.data)
this._audioResList =[];// audios;
}
addPreloadAnima() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment