UNPKG

629 BJavaScriptView Raw
1import { __decorate } from "tslib";
2import { singleton } from 'mana-syringe';
3
4var DisplayObjectPool =
5/** @class */
6function () {
7 function DisplayObjectPool() {
8 this.pool = {};
9 }
10
11 DisplayObjectPool.prototype.getByEntity = function (entity) {
12 return this.pool[entity];
13 };
14
15 DisplayObjectPool.prototype.add = function (entity, groupOrShape) {
16 this.pool[entity] = groupOrShape;
17 };
18
19 DisplayObjectPool.prototype.remove = function (entity) {
20 delete this.pool[entity];
21 };
22
23 DisplayObjectPool = __decorate([singleton()], DisplayObjectPool);
24 return DisplayObjectPool;
25}();
26
27export { DisplayObjectPool };
\No newline at end of file