/************************************************************************************ * FileName : BoxDataManager.ts * Description : * Version : v1.0.0 * CreateTime : 2024-12-17 10:04:40 * Author : * Copyright (c) since 2024 * ============================================================== * Method Description: * * ============================================================== ************************************************************************************/ import {Logger} from "db://assets/core_tgx/base/utils/Logger"; import {IBoxCfg} from "db://assets/module_basic/shared/configs/interface/IBoxCfg"; /** 宝箱表 */ export default class BoxDataManager { private _data: Array | undefined; init(data: any): void { this._data = data; Logger.info(`配置数据(IBoxCfg)加载完毕...`); } getData(id: number):IBoxCfg { if (this._data) { return this._data.find(p=>p.id == id); } console.log("配置数据(IBoxCfg)不存在"+id); return null; } getAllData() : IBoxCfg[]{ return this._data; } }