Source: viewer/PoolObserver.js

goog.provide('entitas.viewer.PoolObserver');


/**
 * @constructor
 *
 * @param _pool
 */
entitas.viewer.PoolObserver = function(_pool) {
  this._pool = _pool;
  this._groups = this._pool._groups;
}
Object.defineProperty(entitas.viewer.PoolObserver.prototype, "name", {
  get: function () {
    return "Pool";
  },
  enumerable: true,
  configurable: true
});
Object.defineProperty(entitas.viewer.PoolObserver.prototype, "Pool", {
  get: function () {
    return "Pool " + " (" +
      this._pool.count + " entities, " +
      this._pool.reusableEntitiesCount + " reusable, " +
      Object.keys(this._groups).length + " groups)";
  },
  enumerable: true,
  configurable: true
});
Object.defineProperty(entitas.viewer.PoolObserver.prototype, "entities", {
  get: function () {
    return this._pool.count;
  },
  enumerable: true,
  configurable: true
});
Object.defineProperty(entitas.viewer.PoolObserver.prototype, "reusable", {
  get: function () {
    return this._pool.reusableEntitiesCount;
  },
  enumerable: true,
  configurable: true
});