Commit 582324f8 authored by limingzhe's avatar limingzhe

feat: 删除错误资源加载

parent 502f448c
...@@ -9,8 +9,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -9,8 +9,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() { addPreloadImage() {
// TODO 根据自己的配置预加载图片资源 // TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
} }
addPreloadAudio() { addPreloadAudio() {
...@@ -105,10 +104,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -105,10 +104,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 在main.js 加入以下代码: // 在main.js 加入以下代码:
// cc.macro.ENABLE_TRANSPARENT_CANVAS = true; //加在 cc.game.run(); 前面 // cc.macro.ENABLE_TRANSPARENT_CANVAS = true; //加在 cc.game.run(); 前面
// cc.director.setClearColor(new cc.Color(0,0,0, 0)); //加在cc.game.run(function); 回调里面 // cc.director.setClearColor(new cc.Color(0,0,0, 0)); //加在cc.game.run(function); 回调里面
cc.Camera.main.backgroundColor = new cc.Color(0,0,0, 0); // cc.Camera.main.backgroundColor = new cc.Color(0,0,0, 0);
// cc.game.canvas.style.backgroundColor = 'rgba(0, 0, 0, 0)' // cc.game.canvas.style.backgroundColor = 'rgba(0, 0, 0, 0)'
cc.game.canvas.style.backgroundColor = 'transparent'; // cc.game.canvas.style.backgroundColor = 'transparent';
} }
......
...@@ -87,8 +87,10 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -87,8 +87,10 @@ export class MyCocosSceneComponent extends cc.Component {
preload() { preload() {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList); const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
console.log('preloadArr: ', preloadArr);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => { cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
console.log('err: ', err);
if (window && window["air"]) { if (window && window["air"]) {
// window["air"].onCourseInScreen = (next) => { // window["air"].onCourseInScreen = (next) => {
// window["air"].isCourseInScreen = true; // window["air"].isCourseInScreen = true;
......
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