1 | import { __decorate } from "tslib";
|
2 | import { singleton } from 'mana-syringe';
|
3 |
|
4 | var DisplayObjectPool =
|
5 |
|
6 | function () {
|
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 |
|
27 | export { DisplayObjectPool }; |
\ | No newline at end of file |