Files
oops-plugin-framework/assets/core/gui/layer/LayerGameElement.ts
dgflash 115cb63fe3 新增 LayerGame 自定义层节点管理功能
1. 支持预制节点添加、删除
2. 支持预制节点对象池
2025-08-15 16:55:52 +08:00

27 lines
709 B
TypeScript

import { _decorator, Component, Node, NodePool } from "cc";
import { GameElementConfig } from "./UIConfig";
const { ccclass } = _decorator;
/** 窗口事件触发组件 */
@ccclass('LayerGameElement')
export class LayerGameElement extends Component {
/** 视图参数 */
params: GameElementParams = null!;
protected onDestroy(): void {
this.params = null!;
}
}
/** 游戏元素参数 */
export class GameElementParams {
/** 游戏元素唯一编号 */
uiid: string = null!;
/** 游戏元素配置 */
config: GameElementConfig = null!
/** 同类游戏元素集合 */
nodes: Node[] = null!;
/** 同类游戏元素对象池 */
pool: NodePool = null!;
}