const { ccclass } = cc._decorator; @ccclass export default class auto_menu extends cc.Component { menu: cc.Node; bg: cc.Node; start_btn: cc.Node; loading_lb: cc.Node; progress: cc.Node; bar: cc.Node; public static URL:string = "db://assets/resources/prefab/Interface/menu.prefab" onLoad () { this.menu = this.node this.bg = this.menu.getChildByName("bg"); this.start_btn = this.menu.getChildByName("start_btn"); this.loading_lb = this.menu.getChildByName("loading_lb"); this.progress = this.menu.getChildByName("progress"); this.bar = this.progress.getChildByName("bar"); } }