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.
87 lines
3.7 KiB
87 lines
3.7 KiB
//#region 文件引入
|
|
import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText } from "cc";
|
|
import BaseUIForm from "../../Mgr_UI/BaseUIForm";
|
|
import RoleDataMgr from "../../Mgr_LocalData/RoleDataMgr";
|
|
import { EGongFaType, QualityType } from "../../const/GameEnum";
|
|
import { EUIForms } from "../../const/UIFormCnf";
|
|
import UIMgr from "../../Mgr_UI/UIMgr";
|
|
import GDUtils from "../../ExCUtils/GDUtils";
|
|
//#endregion 文件引入
|
|
const {ccclass, property,menu} = _decorator;
|
|
@ccclass("PersonalDetailsUI_Proxy")
|
|
export default class PersonalDetailsUI_Proxy extends BaseUIForm{
|
|
//#region 节点自动生成
|
|
@property(Label)
|
|
lab_FightNum: Label = null;
|
|
@property(Label)
|
|
lab_attack: Label = null;
|
|
@property(Label)
|
|
lab_speed: Label = null;
|
|
@property(Label)
|
|
lab_neili: Label = null;
|
|
@property(Node)
|
|
n_talen: Node = null;
|
|
@property(RichText)
|
|
ric_talen: RichText = null;
|
|
@property(Button)
|
|
btn_talen: Button = null;
|
|
@property(Label)
|
|
lab_genji: Label = null;
|
|
@property(Label)
|
|
lab_jianyi: Label = null;
|
|
@property(Label)
|
|
lab_daoyi: Label = null;
|
|
@property(Label)
|
|
lab_qiangyi: Label = null;
|
|
@property(Label)
|
|
lab_shenfa: Label = null;
|
|
@property(Label)
|
|
lab_zhenqi: Label = null;
|
|
@property(Label)
|
|
lab_shouyi: Label = null;
|
|
@property(Label)
|
|
lab_haoyun: Label = null;
|
|
@property(Button)
|
|
btn_Help: Button = null;
|
|
@property(sp.Skeleton)
|
|
spi_hero: sp.Skeleton = null;
|
|
//#endregion 节点自动生成
|
|
|
|
onButtonClick(button:Button){
|
|
|
|
/**点击事件触发*/
|
|
switch (button) {
|
|
case this.btn_Help:
|
|
UIMgr.Ins.ShowUI(EUIForms.ContentDetailsUI)
|
|
break;
|
|
case this.btn_talen:
|
|
UIMgr.Ins.ShowUI(EUIForms.PopTalentDescUI)
|
|
break;
|
|
default:
|
|
ConsoleEx.Log(button);
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
protected start(): void {
|
|
CNodeUtils.switchText(this.lab_FightNum, RoleDataMgr.Ins.fighting);
|
|
CNodeUtils.switchText(this.lab_attack, RoleDataMgr.Ins.attack);
|
|
CNodeUtils.switchText(this.lab_speed, RoleDataMgr.Ins.speed);
|
|
CNodeUtils.switchText(this.lab_neili, RoleDataMgr.Ins.defense);
|
|
CNodeUtils.switchText(this.lab_genji, RoleDataMgr.Ins.wuxue);
|
|
CNodeUtils.switchText(this.lab_jianyi, RoleDataMgr.Ins.attainments[EGongFaType.剑法]);
|
|
CNodeUtils.switchText(this.lab_daoyi, RoleDataMgr.Ins.attainments[EGongFaType.刀法]);
|
|
CNodeUtils.switchText(this.lab_qiangyi, RoleDataMgr.Ins.attainments[EGongFaType.枪法]);
|
|
CNodeUtils.switchText(this.lab_shenfa, RoleDataMgr.Ins.attainments[EGongFaType.轻功]);
|
|
CNodeUtils.switchText(this.lab_zhenqi, RoleDataMgr.Ins.attainments[EGongFaType.内功]);
|
|
CNodeUtils.switchText(this.lab_shouyi, RoleDataMgr.Ins.craft);
|
|
CNodeUtils.switchText(this.lab_haoyun, RoleDataMgr.Ins.lucky);
|
|
const talencfg = this.mDataMgr.Talent.talentData;
|
|
CNodeUtils.setActive(this.n_talen, talencfg !== null);
|
|
if(talencfg !== null){
|
|
const name = GDUtils.GetHEXByQualityForStr(talencfg.name, QualityType.ORANGE);
|
|
CNodeUtils.switchRichText(this.ric_talen,`${name}已生效`);
|
|
}
|
|
}
|
|
}
|