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

44 lines
1.5 KiB

//#region 文件引入
import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText, SpriteFrame } from "cc";
import BaseUIForm from "../../Mgr_UI/BaseUIForm";
import GuideDataMgr from "../../Mgr_Guide/GuideDataMgr";
import MesMgr from "../../MesEvent/MesMgr";
import { EGlobalEvent } from "../../MesEvent/EGlobalEvent";
//#endregion 文件引入
const {ccclass, property,menu} = _decorator;
@ccclass("UnlockUI_Proxy")
export default class UnlockUI_Proxy extends BaseUIForm{
//#region 节点自动生成
@property(Sprite)
spr_icon: Sprite = null;
@property(Label)
lab_name: Label = null;
//#endregion 节点自动生成
@property({type:[SpriteFrame]})
protected mIcons: SpriteFrame[] = [];
onButtonClick(button:Button){
/**点击事件触发*/
switch (button) {
default:
ConsoleEx.Log(button);
break;
}
}
protected start(): void {
if(this.param){
CNodeUtils.switchText(this.lab_name, this.param.title);
this.spr_icon.spriteFrame = this.mIcons[this.param.icon];
}
}
onClick_closeBtn(btn?: Node): void {
this.param.guideid && GuideDataMgr.ins.setExecuteGuide(this.param.guideid);
MesMgr.event(EGlobalEvent.UNLOCK_MAINPAGE);
super.onClick_closeBtn(btn);
}
}