//********************* // create by 流云 // 插件自动生成的节点脚本 // 请勿修改(自动生成会覆盖) // 请通过子类继承使用 // 如何生成可直接调用的UI节点和组件? // 1.在场景节点树中选中要生成的UI根节点 // 2.点击菜单"tool"->“生成UI脚本” 或者使用快捷键(快捷键:Ctrl+Shift+C) // 3.点击后会在script/ui/目录中生成一个以选中节点命名的文件夹,文件夹中会生成两个脚本文件,“Auto_”开头的就是本文件,不可修改,另一个是“UI”+选中节点名称命名的脚本文件,可修改,是需要挂载到选中节点的脚本文件,给用户使用的写逻辑的脚本,只会生成一次 // 4.找到第3步描述的“UI”+选中节点名称命名的脚本文件,将其挂载到选中节点上(第一生成需要挂载,后续修改场景,重复生成的时候,该脚本不会再生成,不用担心会覆盖逻辑脚本) // 下面是类型示例 // 1.按钮,节点名以“btn_”或者“Btn_”开头或者节点添加了Button组件, 例:btn_Close,会生成btn_Close节点和click_btn_Close()方法 // 2.标签,节点名以“lb_”开头, 例:lb_title,会生成lb_title的Label组件 // 3.输入框,节点名以“eb_”开头, 例:eb_input,会生成eb_input的EditBox组件 // 4.滚动视图,节点名以“sv_”开头, 例:sv_list,会生成sv_list的ScrollView组件 // 5.图片,节点名以“img_”或者sp_“”开头, 例:img_Icon,会生成img_Icon的Sprite组件 // 6.普通节点,节点名以“ui_”或者“Ui_”或者“UI_”开头, 例:ui_Content,会生成ui_Content的Node节点 //********************* import { _decorator, Component, Node, find, Sprite, Label, Button, ScrollView, EditBox } from 'cc'; import { UIBase } from '../../../mx/module/ui/UIBase'; const { ccclass } = _decorator; @ccclass('Auto_PanelSettings') export class Auto_PanelSettings extends UIBase { bgMask:Node; ui_box1:Node; btnMusic:Node; btnEffect:Node; btnVibrate:Node; ui_sex:Node; btn_choseMan:Node; btn_choseWoman:Node; ui_boxLang:Node; btn_jtzw:Node; btn_fanti:Node; btn_english:Node; btn_hanyu:Node; btn_riben:Node; btn_xibanya:Node; btn_fayu:Node; btn_deyu:Node; btn_eluosi:Node; btn_putaoya:Node; ui_box2:Node; btnRestart:Node; btnSave:Node; btnDuiHuan:Node; btnGM:Node; btnResetArea:Node; onLoad(){ super.onLoad(); this.bgMask = find("bgMask",this.node); this.ui_box1 = find("center/弹窗游戏设置/ui_box1",this.node); this.btnMusic = find("center/弹窗游戏设置/ui_box1/btnMusic",this.node); this.btnEffect = find("center/弹窗游戏设置/ui_box1/btnEffect",this.node); this.btnVibrate = find("center/弹窗游戏设置/ui_box1/btnVibrate",this.node); this.ui_sex = find("center/弹窗游戏设置/ui_sex",this.node); this.btn_choseMan = find("center/弹窗游戏设置/ui_sex/btn_choseMan",this.node); this.btn_choseWoman = find("center/弹窗游戏设置/ui_sex/btn_choseWoman",this.node); this.ui_boxLang = find("center/弹窗游戏设置/ui_boxLang",this.node); this.btn_jtzw = find("center/弹窗游戏设置/ui_boxLang/btn_jtzw",this.node); this.btn_fanti = find("center/弹窗游戏设置/ui_boxLang/btn_fanti",this.node); this.btn_english = find("center/弹窗游戏设置/ui_boxLang/btn_english",this.node); this.btn_hanyu = find("center/弹窗游戏设置/ui_boxLang/btn_hanyu",this.node); this.btn_riben = find("center/弹窗游戏设置/ui_boxLang/btn_riben",this.node); this.btn_xibanya = find("center/弹窗游戏设置/ui_boxLang/btn_xibanya",this.node); this.btn_fayu = find("center/弹窗游戏设置/ui_boxLang/btn_fayu",this.node); this.btn_deyu = find("center/弹窗游戏设置/ui_boxLang/btn_deyu",this.node); this.btn_eluosi = find("center/弹窗游戏设置/ui_boxLang/btn_eluosi",this.node); this.btn_putaoya = find("center/弹窗游戏设置/ui_boxLang/btn_putaoya",this.node); this.ui_box2 = find("center/弹窗游戏设置/ui_box2",this.node); this.btnRestart = find("center/弹窗游戏设置/ui_box2/btnRestart",this.node); this.btnSave = find("center/弹窗游戏设置/ui_box2/btnSave",this.node); this.btnDuiHuan = find("center/弹窗游戏设置/ui_box2/btnDuiHuan",this.node); this.btnGM = find("center/弹窗游戏设置/ui_box2/btnGM",this.node); this.btnResetArea = find("center/btnResetArea",this.node); } onEnable() { this.bgMask.on(Node.EventType.TOUCH_END, this.click_bgMask, this); this.btnMusic.on(Node.EventType.TOUCH_END, this.click_btnMusic, this); this.btnEffect.on(Node.EventType.TOUCH_END, this.click_btnEffect, this); this.btnVibrate.on(Node.EventType.TOUCH_END, this.click_btnVibrate, this); this.btn_choseMan.on(Node.EventType.TOUCH_END, this.click_btn_choseMan, this); this.btn_choseWoman.on(Node.EventType.TOUCH_END, this.click_btn_choseWoman, this); this.btn_jtzw.on(Node.EventType.TOUCH_END, this.click_btn_jtzw, this); this.btn_fanti.on(Node.EventType.TOUCH_END, this.click_btn_fanti, this); this.btn_english.on(Node.EventType.TOUCH_END, this.click_btn_english, this); this.btn_hanyu.on(Node.EventType.TOUCH_END, this.click_btn_hanyu, this); this.btn_riben.on(Node.EventType.TOUCH_END, this.click_btn_riben, this); this.btn_xibanya.on(Node.EventType.TOUCH_END, this.click_btn_xibanya, this); this.btn_fayu.on(Node.EventType.TOUCH_END, this.click_btn_fayu, this); this.btn_deyu.on(Node.EventType.TOUCH_END, this.click_btn_deyu, this); this.btn_eluosi.on(Node.EventType.TOUCH_END, this.click_btn_eluosi, this); this.btn_putaoya.on(Node.EventType.TOUCH_END, this.click_btn_putaoya, this); this.btnRestart.on(Node.EventType.TOUCH_END, this.click_btnRestart, this); this.btnSave.on(Node.EventType.TOUCH_END, this.click_btnSave, this); this.btnDuiHuan.on(Node.EventType.TOUCH_END, this.click_btnDuiHuan, this); this.btnGM.on(Node.EventType.TOUCH_END, this.click_btnGM, this); this.btnResetArea.on(Node.EventType.TOUCH_END, this.click_btnResetArea, this); } onDisable() { this.bgMask.off(Node.EventType.TOUCH_END, this.click_bgMask, this); this.btnMusic.off(Node.EventType.TOUCH_END, this.click_btnMusic, this); this.btnEffect.off(Node.EventType.TOUCH_END, this.click_btnEffect, this); this.btnVibrate.off(Node.EventType.TOUCH_END, this.click_btnVibrate, this); this.btn_choseMan.off(Node.EventType.TOUCH_END, this.click_btn_choseMan, this); this.btn_choseWoman.off(Node.EventType.TOUCH_END, this.click_btn_choseWoman, this); this.btn_jtzw.off(Node.EventType.TOUCH_END, this.click_btn_jtzw, this); this.btn_fanti.off(Node.EventType.TOUCH_END, this.click_btn_fanti, this); this.btn_english.off(Node.EventType.TOUCH_END, this.click_btn_english, this); this.btn_hanyu.off(Node.EventType.TOUCH_END, this.click_btn_hanyu, this); this.btn_riben.off(Node.EventType.TOUCH_END, this.click_btn_riben, this); this.btn_xibanya.off(Node.EventType.TOUCH_END, this.click_btn_xibanya, this); this.btn_fayu.off(Node.EventType.TOUCH_END, this.click_btn_fayu, this); this.btn_deyu.off(Node.EventType.TOUCH_END, this.click_btn_deyu, this); this.btn_eluosi.off(Node.EventType.TOUCH_END, this.click_btn_eluosi, this); this.btn_putaoya.off(Node.EventType.TOUCH_END, this.click_btn_putaoya, this); this.btnRestart.off(Node.EventType.TOUCH_END, this.click_btnRestart, this); this.btnSave.off(Node.EventType.TOUCH_END, this.click_btnSave, this); this.btnDuiHuan.off(Node.EventType.TOUCH_END, this.click_btnDuiHuan, this); this.btnGM.off(Node.EventType.TOUCH_END, this.click_btnGM, this); this.btnResetArea.off(Node.EventType.TOUCH_END, this.click_btnResetArea, this); } click_bgMask() {} click_btnMusic() {} click_btnEffect() {} click_btnVibrate() {} click_btn_choseMan() {} click_btn_choseWoman() {} click_btn_jtzw() {} click_btn_fanti() {} click_btn_english() {} click_btn_hanyu() {} click_btn_riben() {} click_btn_xibanya() {} click_btn_fayu() {} click_btn_deyu() {} click_btn_eluosi() {} click_btn_putaoya() {} click_btnRestart() {} click_btnSave() {} click_btnDuiHuan() {} click_btnGM() {} click_btnResetArea() {} }