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.
 
 
 
 
AdLike2048/assets/script/ui/BattleGame/Auto_BattleGame.ts

124 lines
6.2 KiB

//*********************
// 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_BattleGame')
export class Auto_BattleGame extends UIBase {
ui_touchMask:Node;
ui_mapParentNode:Node;
ui_top:Node;
ui_title:Node;
btnPause:Node;
btnBattleSpeed:Node;
ui_money:Node;
lb_money:Label;
ui_wave:Node;
lb_wave:Label;
ui_nextWaveTime:Node;
ui_otherskill1List:Node;
ui_otherskill2List:Node;
ui_otherBag:Node;
ui_bottom:Node;
ui_ready:Node;
btnIllustrated:Node;
ui_textList:Node;
btnRefresh:Node;
lb_RefreshNeed:Label;
ui_selfskill1List:Node;
btnGetMoneyAd:Node;
btnAutoM:Node;
ui_selfskill2List:Node;
ui_illustrated:Node;
btnItem:Node;
ui_line:Node;
ui_range:Node;
ui_fly:Node;
ui_skillHint:Node;
rt_lab:RichText;
ui_descLeft:Node;
ui_descRight:Node;
ui_otherDesc:Node;
ui_guide:Node;
onLoad(){
super.onLoad();
this.ui_touchMask = find("ui_touchMask",this.node);
this.ui_mapParentNode = find("ui_mapParentNode",this.node);
this.ui_top = find("ui_top",this.node);
this.ui_title = find("ui_top/ui_title",this.node);
this.btnPause = find("ui_top/btnPause",this.node);
this.btnBattleSpeed = find("ui_top/btnBattleSpeed",this.node);
this.ui_money = find("ui_top/ui_money",this.node);
this.lb_money = find("ui_top/ui_money/lb_money",this.node)?.getComponent(Label);
this.ui_wave = find("ui_top/ui_wave",this.node);
this.lb_wave = find("ui_top/ui_wave/lb_wave",this.node)?.getComponent(Label);
this.ui_nextWaveTime = find("ui_top/ui_wave/ui_nextWaveTime",this.node);
this.ui_otherskill1List = find("ui_top/ui_otherskill1List",this.node);
this.ui_otherskill2List = find("ui_top/ui_otherskill2List",this.node);
this.ui_otherBag = find("ui_top/ui_otherBag",this.node);
this.ui_bottom = find("ui_bottom",this.node);
this.ui_ready = find("ui_bottom/ui_ready",this.node);
this.btnIllustrated = find("ui_bottom/ui_ready/btnIllustrated",this.node);
this.ui_textList = find("ui_bottom/ui_ready/ui_textList",this.node);
this.btnRefresh = find("ui_bottom/ui_ready/btnRefresh",this.node);
this.lb_RefreshNeed = find("ui_bottom/ui_ready/btnRefresh/lay/lb_RefreshNeed",this.node)?.getComponent(Label);
this.ui_selfskill1List = find("ui_bottom/ui_ready/ui_selfskill1List",this.node);
this.btnGetMoneyAd = find("ui_bottom/ui_ready/btnGetMoneyAd",this.node);
this.btnAutoM = find("ui_bottom/ui_ready/btnAutoM",this.node);
this.ui_selfskill2List = find("ui_bottom/ui_ready/ui_selfskill2List",this.node);
this.ui_illustrated = find("ui_bottom/ui_ready/ui_illustrated",this.node);
this.btnItem = find("ui_bottom/ui_ready/btnItem",this.node);
this.ui_line = find("ui_line",this.node);
this.ui_range = find("ui_range",this.node);
this.ui_fly = find("ui_fly",this.node);
this.ui_skillHint = find("ui_skillHint",this.node);
this.rt_lab = find("ui_skillHint/rt_lab",this.node)?.getComponent(RichText);
this.ui_descLeft = find("ui_descLeft",this.node);
this.ui_descRight = find("ui_descRight",this.node);
this.ui_otherDesc = find("ui_otherDesc",this.node);
this.ui_guide = find("ui_guide",this.node);
}
onEnable() {
this.btnPause.on(Node.EventType.TOUCH_END, this.click_btnPause, this);
this.btnBattleSpeed.on(Node.EventType.TOUCH_END, this.click_btnBattleSpeed, this);
this.btnIllustrated.on(Node.EventType.TOUCH_END, this.click_btnIllustrated, this);
this.btnRefresh.on(Node.EventType.TOUCH_END, this.click_btnRefresh, this);
this.btnGetMoneyAd.on(Node.EventType.TOUCH_END, this.click_btnGetMoneyAd, this);
this.btnAutoM.on(Node.EventType.TOUCH_END, this.click_btnAutoM, this);
this.btnItem.on(Node.EventType.TOUCH_END, this.click_btnItem, this);
}
onDisable() {
this.btnPause.off(Node.EventType.TOUCH_END, this.click_btnPause, this);
this.btnBattleSpeed.off(Node.EventType.TOUCH_END, this.click_btnBattleSpeed, this);
this.btnIllustrated.off(Node.EventType.TOUCH_END, this.click_btnIllustrated, this);
this.btnRefresh.off(Node.EventType.TOUCH_END, this.click_btnRefresh, this);
this.btnGetMoneyAd.off(Node.EventType.TOUCH_END, this.click_btnGetMoneyAd, this);
this.btnAutoM.off(Node.EventType.TOUCH_END, this.click_btnAutoM, this);
this.btnItem.off(Node.EventType.TOUCH_END, this.click_btnItem, this);
}
click_btnPause() {}
click_btnBattleSpeed() {}
click_btnIllustrated() {}
click_btnRefresh() {}
click_btnGetMoneyAd() {}
click_btnAutoM() {}
click_btnItem() {}
}