大侠
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.
 
 
 

43 lines
1.5 KiB

//#region 文件引入
import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText } from "cc";
import BaseUIForm from "../../Mgr_UI/BaseUIForm";
//#endregion 文件引入
const {ccclass, property,menu} = _decorator;
@ccclass("FinalTrialFinishUI_Proxy")
export default class FinalTrialFinishUI_Proxy extends BaseUIForm{
//#region 节点自动生成
@property(Node)
n_newrecord: Node = null;
@property(Button)
btn_Continue: Button = null;
@property(Label)
lab_hurt: Label = null;
@property(Label)
lab_rank: Label = null;
//#endregion 节点自动生成
onButtonClick(button:Button){
/**点击事件触发*/
switch (button) {
case this.btn_Continue:
this.CloseUI();
break;
default:
ConsoleEx.Log(button);
break;
}
}
protected CloseUI(btn?: Node): void {
this.mDataMgr.Scene.onTrialChallengeDone();
super.CloseUI(btn);
}
protected start(): void {
const info = this.mDataMgr.Trial.getCurrTrialResult();
CNodeUtils.setActive(this.n_newrecord, info.record === info.damage);
CNodeUtils.switchText(this.lab_hurt, info.damage);
CNodeUtils.switchText(this.lab_rank, info.myrank < 500? info.myrank : "未上榜");
}
}