You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
264 lines
13 KiB
264 lines
13 KiB
|
1 week ago
|
|
||
|
|
//*********************
|
||
|
|
// 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, RichText } from 'cc';
|
||
|
|
import { UIBase } from '../../../mx/module/ui/UIBase';
|
||
|
|
const { ccclass } = _decorator;
|
||
|
|
|
||
|
|
@ccclass('Auto_tetriGame')
|
||
|
|
export class Auto_tetriGame extends UIBase {
|
||
|
|
ui_xuanxiangKuang:Node;
|
||
|
|
ui_mapParentNode:Node;
|
||
|
|
ui_roleWeaponLayer:Node;
|
||
|
|
ui_roleLayer:Node;
|
||
|
|
ui_heightNode:Node;
|
||
|
|
ui_fenduan:Node;
|
||
|
|
ui_fenduan2:Node;
|
||
|
|
ui_tagHeight:Node;
|
||
|
|
ui_10m:Node;
|
||
|
|
ui_30m:Node;
|
||
|
|
ui_60m:Node;
|
||
|
|
ui_100m:Node;
|
||
|
|
ui_Baoxiang10m:Node;
|
||
|
|
ui_Baoxiang30m:Node;
|
||
|
|
ui_Baoxiang60m:Node;
|
||
|
|
ui_Baoxiang100m:Node;
|
||
|
|
ui_Baoxiang10m2:Node;
|
||
|
|
ui_10mshouzhi:Node;
|
||
|
|
ui_monsterParent:Node;
|
||
|
|
ui_tempMonsterParent:Node;
|
||
|
|
ui_monsterHpParent:Node;
|
||
|
|
ui_skillTraillayer:Node;
|
||
|
|
ui_skilllayer:Node;
|
||
|
|
ui_playHp:Node;
|
||
|
|
sp_hpProgressMid:Sprite;
|
||
|
|
sp_hpProgressTop:Sprite;
|
||
|
|
lb_hpNum:Label;
|
||
|
|
btnRecoveyHp:Node;
|
||
|
|
ui_Gold:Node;
|
||
|
|
lb_money:Label;
|
||
|
|
ui_coinEndPos:Node;
|
||
|
|
ui_bottom:Node;
|
||
|
|
btnCoin:Node;
|
||
|
|
ui_mfybAd:Node;
|
||
|
|
lb_mfybCount:Label;
|
||
|
|
lb_coinNum:Label;
|
||
|
|
ui_mfybshouzhi:Node;
|
||
|
|
btnchuzi:Node;
|
||
|
|
ui_czAd:Node;
|
||
|
|
lb_cznum:Label;
|
||
|
|
lb_freeCzLab:Label;
|
||
|
|
ui_chuizishouzhi:Node;
|
||
|
|
btnShenqiBox:Node;
|
||
|
|
ui_sqfkAd:Node;
|
||
|
|
lb_sqnum:Label;
|
||
|
|
lb_freeSqLab:Label;
|
||
|
|
ui_sqbxshouzhi:Node;
|
||
|
|
btnMaotouying:Node;
|
||
|
|
ui_box:Node;
|
||
|
|
ui_boxShouzhi:Node;
|
||
|
|
btnRefreshBox:Node;
|
||
|
|
ui_brboxAd:Node;
|
||
|
|
lb_num:Label;
|
||
|
|
ui_topSpineLayer:Node;
|
||
|
|
ui_scoreLayer:Node;
|
||
|
|
ui_top:Node;
|
||
|
|
btnPause:Node;
|
||
|
|
btnSpeedUp:Node;
|
||
|
|
btn_tip:Node;
|
||
|
|
ui_kuang:Node;
|
||
|
|
lb_boci:Label;
|
||
|
|
ui_card:Node;
|
||
|
|
ui_box1:Node;
|
||
|
|
ui_box2:Node;
|
||
|
|
ui_box3:Node;
|
||
|
|
ui_maxCard:Node;
|
||
|
|
ui_aixinNodes:Node;
|
||
|
|
ui_timeNode:Node;
|
||
|
|
lb_dTime:Label;
|
||
|
|
lb_waveDesc:Label;
|
||
|
|
btnTiqian:Node;
|
||
|
|
ui_hpWarn:Node;
|
||
|
|
ui_Userchuizi:Node;
|
||
|
|
ui_boxJump:Node;
|
||
|
|
ui_chuiziEff:Node;
|
||
|
|
ui_owl:Node;
|
||
|
|
btnOwl:Node;
|
||
|
|
ui_owlStartPos:Node;
|
||
|
|
ui_choosezhezhao1:Node;
|
||
|
|
ui_choosezhezhao2:Node;
|
||
|
|
ui_cancleNode:Node;
|
||
|
|
ui_choosezhezhao:Node;
|
||
|
|
ui_guideHuadong:Node;
|
||
|
|
ui_guideHuadong2:Node;
|
||
|
|
ui_tip:Node;
|
||
|
|
lb_getTip:Label;
|
||
|
|
ui_guidedianjiMty:Node;
|
||
|
|
ui_guideLab:Node;
|
||
|
|
ui_guideLab2:Node;
|
||
|
|
ui_dps:Node;
|
||
|
|
lb_dps:Label;
|
||
|
|
ui_dpsMove:Node;
|
||
|
|
lb_moveDps:Label;
|
||
|
|
onLoad(){
|
||
|
|
super.onLoad();
|
||
|
|
this.ui_xuanxiangKuang = find("ui_xuanxiangKuang",this.node);
|
||
|
|
this.ui_mapParentNode = find("ui_mapParentNode",this.node);
|
||
|
|
this.ui_roleWeaponLayer = find("ui_roleWeaponLayer",this.node);
|
||
|
|
this.ui_roleLayer = find("ui_roleLayer",this.node);
|
||
|
|
this.ui_heightNode = find("ui_heightNode",this.node);
|
||
|
|
this.ui_fenduan = find("ui_heightNode/ui_fenduan",this.node);
|
||
|
|
this.ui_fenduan2 = find("ui_heightNode/ui_fenduan2",this.node);
|
||
|
|
this.ui_tagHeight = find("ui_heightNode/ui_tagHeight",this.node);
|
||
|
|
this.ui_10m = find("ui_heightNode/ui_10m",this.node);
|
||
|
|
this.ui_30m = find("ui_heightNode/ui_30m",this.node);
|
||
|
|
this.ui_60m = find("ui_heightNode/ui_60m",this.node);
|
||
|
|
this.ui_100m = find("ui_heightNode/ui_100m",this.node);
|
||
|
|
this.ui_Baoxiang10m = find("ui_heightNode/ui_Baoxiang10m",this.node);
|
||
|
|
this.ui_Baoxiang30m = find("ui_heightNode/ui_Baoxiang30m",this.node);
|
||
|
|
this.ui_Baoxiang60m = find("ui_heightNode/ui_Baoxiang60m",this.node);
|
||
|
|
this.ui_Baoxiang100m = find("ui_heightNode/ui_Baoxiang100m",this.node);
|
||
|
|
this.ui_Baoxiang10m2 = find("ui_heightNode/ui_Baoxiang10m2",this.node);
|
||
|
|
this.ui_10mshouzhi = find("ui_heightNode/ui_10mshouzhi",this.node);
|
||
|
|
this.ui_monsterParent = find("ui_monsterParent",this.node);
|
||
|
|
this.ui_tempMonsterParent = find("ui_tempMonsterParent",this.node);
|
||
|
|
this.ui_monsterHpParent = find("ui_monsterHpParent",this.node);
|
||
|
|
this.ui_skillTraillayer = find("ui_skillTraillayer",this.node);
|
||
|
|
this.ui_skilllayer = find("ui_skilllayer",this.node);
|
||
|
|
this.ui_playHp = find("ui_playHp",this.node);
|
||
|
|
this.sp_hpProgressMid = find("ui_playHp/sp_hpProgressMid",this.node)?.getComponent(Sprite);
|
||
|
|
this.sp_hpProgressTop = find("ui_playHp/sp_hpProgressTop",this.node)?.getComponent(Sprite);
|
||
|
|
this.lb_hpNum = find("ui_playHp/lb_hpNum",this.node)?.getComponent(Label);
|
||
|
|
this.btnRecoveyHp = find("ui_playHp/btnRecoveyHp",this.node);
|
||
|
|
this.ui_Gold = find("ui_Gold",this.node);
|
||
|
|
this.lb_money = find("ui_Gold/lb_money",this.node)?.getComponent(Label);
|
||
|
|
this.ui_coinEndPos = find("ui_Gold/ui_coinEndPos",this.node);
|
||
|
|
this.ui_bottom = find("ui_bottom",this.node);
|
||
|
|
this.btnCoin = find("ui_bottom/btnCoin",this.node);
|
||
|
|
this.ui_mfybAd = find("ui_bottom/btnCoin/ui_mfybAd",this.node);
|
||
|
|
this.lb_mfybCount = find("ui_bottom/btnCoin/lb_mfybCount",this.node)?.getComponent(Label);
|
||
|
|
this.lb_coinNum = find("ui_bottom/btnCoin/lb_coinNum",this.node)?.getComponent(Label);
|
||
|
|
this.ui_mfybshouzhi = find("ui_bottom/btnCoin/ui_mfybshouzhi",this.node);
|
||
|
|
this.btnchuzi = find("ui_bottom/btnchuzi",this.node);
|
||
|
|
this.ui_czAd = find("ui_bottom/btnchuzi/ui_czAd",this.node);
|
||
|
|
this.lb_cznum = find("ui_bottom/btnchuzi/lb_cznum",this.node)?.getComponent(Label);
|
||
|
|
this.lb_freeCzLab = find("ui_bottom/btnchuzi/lb_freeCzLab",this.node)?.getComponent(Label);
|
||
|
|
this.ui_chuizishouzhi = find("ui_bottom/btnchuzi/ui_chuizishouzhi",this.node);
|
||
|
|
this.btnShenqiBox = find("ui_bottom/btnShenqiBox",this.node);
|
||
|
|
this.ui_sqfkAd = find("ui_bottom/btnShenqiBox/ui_sqfkAd",this.node);
|
||
|
|
this.lb_sqnum = find("ui_bottom/btnShenqiBox/lb_sqnum",this.node)?.getComponent(Label);
|
||
|
|
this.lb_freeSqLab = find("ui_bottom/btnShenqiBox/lb_freeSqLab",this.node)?.getComponent(Label);
|
||
|
|
this.ui_sqbxshouzhi = find("ui_bottom/btnShenqiBox/ui_sqbxshouzhi",this.node);
|
||
|
|
this.btnMaotouying = find("ui_bottom/btnMaotouying",this.node);
|
||
|
|
this.ui_box = find("ui_bottom/btnMaotouying/ui_box",this.node);
|
||
|
|
this.ui_boxShouzhi = find("ui_bottom/btnMaotouying/ui_box/ui_boxShouzhi",this.node);
|
||
|
|
this.btnRefreshBox = find("ui_bottom/btnRefreshBox",this.node);
|
||
|
|
this.ui_brboxAd = find("ui_bottom/btnRefreshBox/ui_brboxAd",this.node);
|
||
|
|
this.lb_num = find("ui_bottom/btnRefreshBox/lb_num",this.node)?.getComponent(Label);
|
||
|
|
this.ui_topSpineLayer = find("ui_topSpineLayer",this.node);
|
||
|
|
this.ui_scoreLayer = find("ui_scoreLayer",this.node);
|
||
|
|
this.ui_top = find("ui_top",this.node);
|
||
|
|
this.btnPause = find("ui_top/btnPause",this.node);
|
||
|
|
this.btnSpeedUp = find("ui_top/btnSpeedUp",this.node);
|
||
|
|
this.btn_tip = find("ui_top/btn_tip",this.node);
|
||
|
|
this.ui_kuang = find("ui_top/ui_kuang",this.node);
|
||
|
|
this.lb_boci = find("ui_top/ui_kuang/lb_boci",this.node)?.getComponent(Label);
|
||
|
|
this.ui_card = find("ui_card",this.node);
|
||
|
|
this.ui_box1 = find("ui_card/ui_box1",this.node);
|
||
|
|
this.ui_box2 = find("ui_card/ui_box2",this.node);
|
||
|
|
this.ui_box3 = find("ui_card/ui_box3",this.node);
|
||
|
|
this.ui_maxCard = find("ui_maxCard",this.node);
|
||
|
|
this.ui_aixinNodes = find("ui_aixinNodes",this.node);
|
||
|
|
this.ui_timeNode = find("ui_timeNode",this.node);
|
||
|
|
this.lb_dTime = find("ui_timeNode/lb_dTime",this.node)?.getComponent(Label);
|
||
|
|
this.lb_waveDesc = find("ui_timeNode/lb_waveDesc",this.node)?.getComponent(Label);
|
||
|
|
this.btnTiqian = find("ui_timeNode/btnTiqian",this.node);
|
||
|
|
this.ui_hpWarn = find("ui_hpWarn",this.node);
|
||
|
|
this.ui_Userchuizi = find("ui_Userchuizi",this.node);
|
||
|
|
this.ui_boxJump = find("ui_boxJump",this.node);
|
||
|
|
this.ui_chuiziEff = find("ui_chuiziEff",this.node);
|
||
|
|
this.ui_owl = find("ui_owl",this.node);
|
||
|
|
this.btnOwl = find("ui_owl/btnOwl",this.node);
|
||
|
|
this.ui_owlStartPos = find("ui_owl/ui_owlStartPos",this.node);
|
||
|
|
this.ui_choosezhezhao1 = find("ui_choosezhezhao1",this.node);
|
||
|
|
this.ui_choosezhezhao2 = find("ui_choosezhezhao2",this.node);
|
||
|
|
this.ui_cancleNode = find("ui_cancleNode",this.node);
|
||
|
|
this.ui_choosezhezhao = find("ui_choosezhezhao",this.node);
|
||
|
|
this.ui_guideHuadong = find("ui_guideHuadong",this.node);
|
||
|
|
this.ui_guideHuadong2 = find("ui_guideHuadong2",this.node);
|
||
|
|
this.ui_tip = find("ui_tip",this.node);
|
||
|
|
this.lb_getTip = find("ui_tip/lb_getTip",this.node)?.getComponent(Label);
|
||
|
|
this.ui_guidedianjiMty = find("ui_guidedianjiMty",this.node);
|
||
|
|
this.ui_guideLab = find("ui_guideLab",this.node);
|
||
|
|
this.ui_guideLab2 = find("ui_guideLab2",this.node);
|
||
|
|
this.ui_dps = find("ui_dps",this.node);
|
||
|
|
this.lb_dps = find("ui_dps/lb_dps",this.node)?.getComponent(Label);
|
||
|
|
this.ui_dpsMove = find("ui_dpsMove",this.node);
|
||
|
|
this.lb_moveDps = find("ui_dpsMove/lb_moveDps",this.node)?.getComponent(Label);
|
||
|
|
}
|
||
|
|
onEnable() {
|
||
|
|
this.ui_Baoxiang10m.on(Node.EventType.TOUCH_END, this.click_ui_Baoxiang10m, this);
|
||
|
|
this.ui_Baoxiang30m.on(Node.EventType.TOUCH_END, this.click_ui_Baoxiang30m, this);
|
||
|
|
this.ui_Baoxiang60m.on(Node.EventType.TOUCH_END, this.click_ui_Baoxiang60m, this);
|
||
|
|
this.ui_Baoxiang100m.on(Node.EventType.TOUCH_END, this.click_ui_Baoxiang100m, this);
|
||
|
|
this.btnRecoveyHp.on(Node.EventType.TOUCH_END, this.click_btnRecoveyHp, this);
|
||
|
|
this.btnCoin.on(Node.EventType.TOUCH_END, this.click_btnCoin, this);
|
||
|
|
this.btnchuzi.on(Node.EventType.TOUCH_END, this.click_btnchuzi, this);
|
||
|
|
this.btnShenqiBox.on(Node.EventType.TOUCH_END, this.click_btnShenqiBox, this);
|
||
|
|
this.btnMaotouying.on(Node.EventType.TOUCH_END, this.click_btnMaotouying, this);
|
||
|
|
this.btnRefreshBox.on(Node.EventType.TOUCH_END, this.click_btnRefreshBox, this);
|
||
|
|
this.btnPause.on(Node.EventType.TOUCH_END, this.click_btnPause, this);
|
||
|
|
this.btnSpeedUp.on(Node.EventType.TOUCH_END, this.click_btnSpeedUp, this);
|
||
|
|
this.btn_tip.on(Node.EventType.TOUCH_END, this.click_btn_tip, this);
|
||
|
|
this.btnTiqian.on(Node.EventType.TOUCH_END, this.click_btnTiqian, this);
|
||
|
|
this.btnOwl.on(Node.EventType.TOUCH_END, this.click_btnOwl, this);
|
||
|
|
}
|
||
|
|
onDisable() {
|
||
|
|
this.ui_Baoxiang10m.off(Node.EventType.TOUCH_END, this.click_ui_Baoxiang10m, this);
|
||
|
|
this.ui_Baoxiang30m.off(Node.EventType.TOUCH_END, this.click_ui_Baoxiang30m, this);
|
||
|
|
this.ui_Baoxiang60m.off(Node.EventType.TOUCH_END, this.click_ui_Baoxiang60m, this);
|
||
|
|
this.ui_Baoxiang100m.off(Node.EventType.TOUCH_END, this.click_ui_Baoxiang100m, this);
|
||
|
|
this.btnRecoveyHp.off(Node.EventType.TOUCH_END, this.click_btnRecoveyHp, this);
|
||
|
|
this.btnCoin.off(Node.EventType.TOUCH_END, this.click_btnCoin, this);
|
||
|
|
this.btnchuzi.off(Node.EventType.TOUCH_END, this.click_btnchuzi, this);
|
||
|
|
this.btnShenqiBox.off(Node.EventType.TOUCH_END, this.click_btnShenqiBox, this);
|
||
|
|
this.btnMaotouying.off(Node.EventType.TOUCH_END, this.click_btnMaotouying, this);
|
||
|
|
this.btnRefreshBox.off(Node.EventType.TOUCH_END, this.click_btnRefreshBox, this);
|
||
|
|
this.btnPause.off(Node.EventType.TOUCH_END, this.click_btnPause, this);
|
||
|
|
this.btnSpeedUp.off(Node.EventType.TOUCH_END, this.click_btnSpeedUp, this);
|
||
|
|
this.btn_tip.off(Node.EventType.TOUCH_END, this.click_btn_tip, this);
|
||
|
|
this.btnTiqian.off(Node.EventType.TOUCH_END, this.click_btnTiqian, this);
|
||
|
|
this.btnOwl.off(Node.EventType.TOUCH_END, this.click_btnOwl, this);
|
||
|
|
}
|
||
|
|
click_ui_Baoxiang10m() {}
|
||
|
|
click_ui_Baoxiang30m() {}
|
||
|
|
click_ui_Baoxiang60m() {}
|
||
|
|
click_ui_Baoxiang100m() {}
|
||
|
|
click_btnRecoveyHp() {}
|
||
|
|
click_btnCoin() {}
|
||
|
|
click_btnchuzi() {}
|
||
|
|
click_btnShenqiBox() {}
|
||
|
|
click_btnMaotouying() {}
|
||
|
|
click_btnRefreshBox() {}
|
||
|
|
click_btnPause() {}
|
||
|
|
click_btnSpeedUp() {}
|
||
|
|
click_btn_tip() {}
|
||
|
|
click_btnTiqian() {}
|
||
|
|
click_btnOwl() {}
|
||
|
|
}
|