Commit c0970d13 authored by limingzhe's avatar limingzhe

fix: debug

parent 4db52ea0
...@@ -191,11 +191,14 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -191,11 +191,14 @@ export abstract class middleLayerBase extends cc.Component {
this.nodeList = []; this.nodeList = [];
console.log('汪汪汪: getDragonDisplayAssetList'); console.log('汪汪汪: getDragonDisplayAssetList');
this.getDragonDisplayAssetList(cc.find('Canvas')); this.getDragonDisplayAssetList(cc.find('Canvas'));
this.toCleanParent();
console.log('喵喵喵1: ' + this.nodeList.length); console.log('喵喵喵1: ' + this.nodeList.length);
console.log('喵喵喵2: ' + this.atlasList.length); console.log('喵喵喵2: ' + this.atlasList.length);
console.log('喵喵喵3: ' + this.assetList.length); console.log('喵喵喵3: ' + this.assetList.length);
console.log('喵喵喵4: ' + this.textureList.length); console.log('喵喵喵4: ' + this.textureList.length);
this.loadBundleLock = true; // 加锁 this.loadBundleLock = true; // 加锁
...@@ -477,8 +480,8 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -477,8 +480,8 @@ export abstract class middleLayerBase extends cc.Component {
asset.destroy(); asset.destroy();
// node.active = false; node.active = false;
// node.removeFromParent(); node.removeFromParent();
texture.decRef(); texture.decRef();
...@@ -573,8 +576,6 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -573,8 +576,6 @@ export abstract class middleLayerBase extends cc.Component {
textureList = null; textureList = null;
getDragonDisplayAssetList(node) { getDragonDisplayAssetList(node) {
const canvas = cc.find("Canvas");
const dragonDisplay = node.getComponent(dragonBones.ArmatureDisplay); const dragonDisplay = node.getComponent(dragonBones.ArmatureDisplay);
if (dragonDisplay) { if (dragonDisplay) {
const atlas = dragonDisplay.dragonAtlasAsset; const atlas = dragonDisplay.dragonAtlasAsset;
...@@ -596,7 +597,6 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -596,7 +597,6 @@ export abstract class middleLayerBase extends cc.Component {
this.assetList.push(asset); this.assetList.push(asset);
this.textureList.push(atlas.texture); this.textureList.push(atlas.texture);
node.parent = canvas;
// this.assetObj[uuid] = true; // this.assetObj[uuid] = true;
console.log('汪汪汪: atlas.texture.nativeUrl = ' + atlas.texture.nativeUrl); console.log('汪汪汪: atlas.texture.nativeUrl = ' + atlas.texture.nativeUrl);
...@@ -610,4 +610,12 @@ export abstract class middleLayerBase extends cc.Component { ...@@ -610,4 +610,12 @@ export abstract class middleLayerBase extends cc.Component {
}); });
} }
toCleanParent() {
const canvas = cc.find("Canvas");
this.nodeList.forEach(node => {
node.parent = canvas;
});
}
} }
\ No newline at end of file
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