mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-05-16 11:18:25 +08:00
29 lines
736 B
TypeScript
29 lines
736 B
TypeScript
import type { Node, NodePool } from 'cc';
|
|
import { _decorator, Component } from 'cc';
|
|
import type { 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!;
|
|
}
|