Commit 86952d02 authored by Tt's avatar Tt

预加载内容去除

parent 8e5c4ee1
...@@ -21,18 +21,18 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -21,18 +21,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadAudio() { addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源 // TODO 根据自己的配置预加载音频资源
let audios = []; // let audios = [];
function checkAudio(obj) { // function checkAudio(obj) {
for (let idx in obj) { // for (let idx in obj) {
if (typeof obj[idx] == "object") { // if (typeof obj[idx] == "object") {
checkAudio(obj[idx]); // checkAudio(obj[idx]);
} else if (typeof obj[idx] == "string") { // } else if (typeof obj[idx] == "string") {
if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]); // if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
} // }
} // }
} // }
checkAudio(this.data) // checkAudio(this.data)
this._audioResList = audios; this._audioResList =[];// audios;
} }
addPreloadAnima() { 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