const { ccclass } = cc._decorator; @ccclass export default class auto_failView extends cc.Component { failView: cc.Node; bg: cc.Node; reStart_btn: cc.Node; jieshu: cc.Node; target_img: cc.Node; public static URL:string = "db://assets/resources/prefab/Interface/failView.prefab" onLoad () { this.failView = this.node this.bg = this.failView.getChildByName("bg"); this.reStart_btn = this.failView.getChildByName("reStart_btn"); this.jieshu = this.failView.getChildByName("jieshu"); this.target_img = this.failView.getChildByName("target_img"); } }