//#region 文件引入 import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText, SpriteFrame } from "cc"; import BaseUIForm from "../../Mgr_UI/BaseUIForm"; import FrameLayout from "../../CComEx/FrameLayout"; import SceneDataMgr from "../../Mgr_LocalData/SceneDataMgr"; //#endregion 文件引入 const {ccclass, property,menu} = _decorator; @ccclass("VictoryUI_Proxy") export default class VictoryStroyUI extends BaseUIForm{ //#region 节点自动生成 @property(Node) n_SuccNode: Node = null; @property(Label) lab_story: Label = null; @property(Label) lab_notice: Label = null; @property(Label) lab_name: Label = null; @property(Button) btn_Continue: Button = null; //#endregion 节点自动生成 onButtonClick(button:Button){ /**点击事件触发*/ switch (button) { case this.btn_Continue: this.CloseUI(); break; default: ConsoleEx.Log(button); break; } } protected CloseUI(btn?: Node): void { super.CloseUI(btn); SceneDataMgr.Ins.onSummaryComplete(true); } protected start(): void { const param = this.param; CNodeUtils.switchText(this.lab_name,param.bossname); CNodeUtils.switchText(this.lab_notice,`你击败了${param.bossname}!`); CNodeUtils.switchText(this.lab_story,param.bossstory); } }