System.register(["cc"], function (_export, _context) { "use strict"; var _cclegacy, NetBase, _crd; _export("NetBase", void 0); return { setters: [function (_cc) { _cclegacy = _cc.cclegacy; }], execute: function () { _crd = true; _cclegacy._RF.push({}, "ee4ceP8Y6tOb7rdImpQdJVo", "NetBase", undefined); /**网络变量基类*/ _export("NetBase", NetBase = class NetBase { get Id() { return this._id; } constructor(id) { this._id = void 0; this.dataMap = {}; this.dirtyMap = {}; this._id = id; this.dataMap = {}; } /**初始变量值*/ initValue(data) { this.dataMap = data != null ? data : {}; } /**修改某个键的值*/ setValue(key, value) { this.dataMap[key] = value; } setValueDirty(key, value) { this.dirtyMap[key] = value; } /**获取数据的值*/ getValue(key) { return this.dataMap[key]; } /**处理脏数据*/ doDirtyData(f) { if (Object.keys(this.dirtyMap).length === 0) return null; f(this.dirtyMap); this.dirtyMap = {}; } dispose() { this.dataMap = {}; this.dirtyMap = {}; } }); _cclegacy._RF.pop(); _crd = false; } }; }); //# sourceMappingURL=9abeafe9347e2a5a1b4f98c437cea60863704cf7.js.map