2d-gaming
Version:
This is an Angular package fo developing 2d games in angular. [Please report issues/questions/any ideas to better help this package](https://github.com/CWestBlue/2d-gaming/issues).
26 lines • 891 B
JavaScript
import { ObjectArray } from '../ObjectLogic/ammo.component';
var GameObjectCategory = (function () {
function GameObjectCategory(gameObjects) {
this.gameObjects = gameObjects;
this.barriers = new ObjectArray();
this.nonBarriers = new ObjectArray();
}
GameObjectCategory.prototype.set = function () {
var _this = this;
this.gameObjects.items.forEach(function (item) {
if (item.isBarrier === true) {
_this.barriers.add(item);
}
else {
_this.nonBarriers.add(item);
}
});
};
GameObjectCategory.prototype.clear = function () {
this.barriers.items = [];
this.nonBarriers.items = [];
};
return GameObjectCategory;
}());
export { GameObjectCategory };
//# sourceMappingURL=object-category-setter.js.map