{
  "code": "export class GamePool {\r\n    constructor() {\r\n        this.maxAcount = 30;\r\n        this.modelpool = {};\r\n        GamePool.ins = this;\r\n    }\r\n    static get Instance() {\r\n        if (GamePool.ins) {\r\n            return GamePool.ins;\r\n        }\r\n        else {\r\n            return new GamePool();\r\n        }\r\n    }\r\n    GetModel(title) {\r\n        let poolname = title;\r\n        if (this.modelpool[poolname] != null && this.modelpool[poolname] != undefined) {\r\n            if (this.modelpool[poolname].length > 0) {\r\n                let model1 = this.modelpool[poolname].shift();\r\n                if (!model1.active) {\r\n                    model1.active = true;\r\n                }\r\n                return model1;\r\n            }\r\n            else {\r\n                let model = new Laya.Image();\r\n                model.name = title;\r\n                return model;\r\n            }\r\n        }\r\n        else {\r\n            let model = new Laya.Image();\r\n            model.name = title;\r\n            return model;\r\n        }\r\n    }\r\n    RecoverModel(_image, title = \"\", modelstate = false) {\r\n        if (_image.destroyed) {\r\n            return;\r\n        }\r\n        if (!modelstate && _image.active == false) {\r\n            return;\r\n        }\r\n        let poolname = title;\r\n        if (this.modelpool[poolname] != null && this.modelpool[poolname] != undefined) {\r\n            let modelnum = this.modelpool[poolname];\r\n            this.modelpool[poolname].push(_image);\r\n        }\r\n        else {\r\n            let modelnum = [];\r\n            modelnum.push(_image);\r\n            this.modelpool[poolname] = modelnum;\r\n        }\r\n        _image.removeSelf();\r\n        _image.active = false;\r\n    }\r\n}\r\n//# sourceMappingURL=GamePool.js.map",
  "references": [],
  "map": "{\"version\":3,\"file\":\"GamePool.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/Tool/GamePool.ts\"],\"names\":[],\"mappings\":\"AACI,MAAM,OAAO,QAAQ;IAErB;QAKQ,cAAS,GAAU,EAAE,CAAC;QAWtB,cAAS,GAAuC,EAAE,CAAC;QAfvD,QAAQ,CAAC,GAAG,GAAG,IAAI,CAAC;IACxB,CAAC;IAKM,MAAM,KAAK,QAAQ;QACtB,IAAG,QAAQ,CAAC,GAAG,EAAC;YACZ,OAAO,QAAQ,C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