const { ccclass } = cc._decorator; @ccclass export default class auto_welfareView extends cc.Component { welfareView: cc.Node; mask: cc.Node; bg: cc.Node; npc: cc.Node; icon_btn2: cc.Node; weapon: cc.Node; icon_btn: cc.Node; gun: cc.Node; icon_btn1: cc.Node; bullet: cc.Node; icon: cc.Node; xcz_4m: cc.Node; xcz_wz: cc.Node; weapon_list: cc.Node; gun_list: cc.Node; bullet_list: cc.Node; close: cc.Node; close_icon: cc.Node; public static URL:string = "db://assets/resources/prefab/Interface/welfareView.prefab" onLoad () { this.welfareView = this.node this.mask = this.welfareView.getChildByName("mask"); this.bg = this.welfareView.getChildByName("bg"); this.npc = this.bg.getChildByName("npc"); this.icon_btn2 = this.npc.getChildByName("icon_btn2"); this.weapon = this.bg.getChildByName("weapon"); this.icon_btn = this.weapon.getChildByName("icon_btn"); this.gun = this.bg.getChildByName("gun"); this.icon_btn1 = this.gun.getChildByName("icon_btn1"); this.bullet = this.bg.getChildByName("bullet"); this.icon = this.bullet.getChildByName("icon"); this.xcz_4m = this.welfareView.getChildByName("xcz_4m"); this.xcz_wz = this.welfareView.getChildByName("xcz_wz"); this.weapon_list = this.xcz_wz.getChildByName("weapon_list"); this.gun_list = this.xcz_wz.getChildByName("gun_list"); this.bullet_list = this.xcz_wz.getChildByName("bullet_list"); this.close = this.welfareView.getChildByName("close"); this.close_icon = this.close.getChildByName("close_icon"); } }