Commit c0970d13 authored by limingzhe's avatar limingzhe

fix: debug

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