const { ccclass, property } = cc._decorator; @ccclass export default class GameLoading extends cc.Component { protected showNode: cc.Node = null; protected btnRestart: cc.Node = null; protected btnBack: cc.Node = null; protected btnShare: cc.Node = null; protected fireworksNode: cc.Node = null; protected start(): void { this.btnBack = this.node.getChildByName("bg").getChildByName("snBG").getChildByName("snBack"); this.btnBack.on("click", () => { this.node.removeFromParent(); this.node.destroy(); }, this); } }