Commit c0cb1702 authored by 李维's avatar 李维

添加日志

parent 0bf5fa9e
...@@ -163,6 +163,7 @@ export default class PageViewerClass extends cc.Component { ...@@ -163,6 +163,7 @@ export default class PageViewerClass extends cc.Component {
global.middleLayer.loadPrefabByBundleName("middleLayer_for_kyxq", prefabPath[viewName], async (err, prefab) => { global.middleLayer.loadPrefabByBundleName("middleLayer_for_kyxq", prefabPath[viewName], async (err, prefab) => {
// this[PageMap[viewName]] = cc.instantiate(this[`p_${PageMap[viewName]}`]); // this[PageMap[viewName]] = cc.instantiate(this[`p_${PageMap[viewName]}`]);
console.log(`创建页面: ${prefab.name}`)
this[PageMap[viewName]] = cc.instantiate(prefab); this[PageMap[viewName]] = cc.instantiate(prefab);
this[PageMap[viewName]].attr({ this[PageMap[viewName]].attr({
viewer: this.node, viewer: this.node,
...@@ -266,6 +267,7 @@ export default class PageViewerClass extends cc.Component { ...@@ -266,6 +267,7 @@ export default class PageViewerClass extends cc.Component {
} }
destroyPage(node) { destroyPage(node) {
console.log(`销毁页面: ${node.name}`)
const script = node.getComponent(node.name) const script = node.getComponent(node.name)
script && script.beforeDestroy && script.beforeDestroy(); script && script.beforeDestroy && script.beforeDestroy();
......
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