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.
130 lines
6.2 KiB
130 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_jiujiuwoyaGame')
|
|
export class Auto_jiujiuwoyaGame extends UIBase {
|
|
ui_fightArea:Node;
|
|
ui_standUp:Node;
|
|
ui_mapParentNode:Node;
|
|
ui_roleWeaponLayer:Node;
|
|
ui_roleLayer:Node;
|
|
ui_monsterParent:Node;
|
|
ui_monsterHpParent:Node;
|
|
ui_skillTraillayer:Node;
|
|
ui_skilllayer:Node;
|
|
ui_yaLayer:Node;
|
|
ui_yazi:Node;
|
|
ui_mubanLayer:Node;
|
|
ui_floorNode:Node;
|
|
ui_luosidingTemp:Node;
|
|
ui_luosiding:Node;
|
|
ui_playExp:Node;
|
|
sp_expProgressTop:Sprite;
|
|
lb_expNum:Label;
|
|
ui_playHp:Node;
|
|
ui_progressBar:Node;
|
|
lb_hpNum:Label;
|
|
ui_bottom:Node;
|
|
btnXiaochu:Node;
|
|
btnDaduan:Node;
|
|
btnJieSuo:Node;
|
|
ui_topSpineLayer:Node;
|
|
ui_scoreLayer:Node;
|
|
ui_top:Node;
|
|
btnPause:Node;
|
|
btnSpeedUp:Node;
|
|
ui_kuang:Node;
|
|
lb_boci:Label;
|
|
ui_timeNode:Node;
|
|
lb_dTime:Label;
|
|
lb_waveDesc:Label;
|
|
ui_hpWarn:Node;
|
|
ui_expPlist:Node;
|
|
ui_dps:Node;
|
|
lb_dps:Label;
|
|
ui_dpsMove:Node;
|
|
lb_moveDps:Label;
|
|
onLoad(){
|
|
super.onLoad();
|
|
this.ui_fightArea = find("ui_fightArea",this.node);
|
|
this.ui_standUp = find("ui_standUp",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_monsterParent = find("ui_monsterParent",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_yaLayer = find("ui_yaLayer",this.node);
|
|
this.ui_yazi = find("ui_yaLayer/ui_yazi",this.node);
|
|
this.ui_mubanLayer = find("ui_mubanLayer",this.node);
|
|
this.ui_floorNode = find("ui_floorNode",this.node);
|
|
this.ui_luosidingTemp = find("ui_luosidingTemp",this.node);
|
|
this.ui_luosiding = find("ui_luosiding",this.node);
|
|
this.ui_playExp = find("ui_playExp",this.node);
|
|
this.sp_expProgressTop = find("ui_playExp/sp_expProgressTop",this.node)?.getComponent(Sprite);
|
|
this.lb_expNum = find("ui_playExp/lb_expNum",this.node)?.getComponent(Label);
|
|
this.ui_playHp = find("ui_playHp",this.node);
|
|
this.ui_progressBar = find("ui_playHp/ui_progressBar",this.node);
|
|
this.lb_hpNum = find("ui_playHp/lb_hpNum",this.node)?.getComponent(Label);
|
|
this.ui_bottom = find("ui_bottom",this.node);
|
|
this.btnXiaochu = find("ui_bottom/btnXiaochu",this.node);
|
|
this.btnDaduan = find("ui_bottom/btnDaduan",this.node);
|
|
this.btnJieSuo = find("ui_bottom/btnJieSuo",this.node);
|
|
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.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_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.ui_hpWarn = find("ui_hpWarn",this.node);
|
|
this.ui_expPlist = find("ui_expPlist",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.btnXiaochu.on(Node.EventType.TOUCH_END, this.click_btnXiaochu, this);
|
|
this.btnDaduan.on(Node.EventType.TOUCH_END, this.click_btnDaduan, this);
|
|
this.btnJieSuo.on(Node.EventType.TOUCH_END, this.click_btnJieSuo, this);
|
|
this.btnPause.on(Node.EventType.TOUCH_END, this.click_btnPause, this);
|
|
this.btnSpeedUp.on(Node.EventType.TOUCH_END, this.click_btnSpeedUp, this);
|
|
}
|
|
onDisable() {
|
|
this.btnXiaochu.off(Node.EventType.TOUCH_END, this.click_btnXiaochu, this);
|
|
this.btnDaduan.off(Node.EventType.TOUCH_END, this.click_btnDaduan, this);
|
|
this.btnJieSuo.off(Node.EventType.TOUCH_END, this.click_btnJieSuo, this);
|
|
this.btnPause.off(Node.EventType.TOUCH_END, this.click_btnPause, this);
|
|
this.btnSpeedUp.off(Node.EventType.TOUCH_END, this.click_btnSpeedUp, this);
|
|
}
|
|
click_btnXiaochu() {}
|
|
click_btnDaduan() {}
|
|
click_btnJieSuo() {}
|
|
click_btnPause() {}
|
|
click_btnSpeedUp() {}
|
|
} |