Commit a2a7b518 authored by 李维's avatar 李维

修复再次进入单元、任务页控制台报错问题

parent 9632f862
......@@ -204,7 +204,7 @@ export default class NewClass extends cc.Component {
const sy = canvas.height / sf.node.height;
bg.getComponent(cc.Sprite).spriteFrame = sf.spriteFrame;
bg.scale = Math.max(sx, sy);
cc.find("bg/bg_default", this.node).destroy();
cc.find("bg/bg_default", this.node).opacity = 0;
})
}
......
......@@ -75,7 +75,7 @@ export default class NewClass extends cc.Component {
const sy = canvas.height / sf.node.height;
bg.getComponent(cc.Sprite).spriteFrame = sf.spriteFrame;
bg.scale = Math.max(sx, sy);
cc.find("bg/bg_default", this.node).destroy();
cc.find("bg/bg_default", this.node).opacity = 0;
})
}
......
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