getNextObjectInPool method

RenderableObject getNextObjectInPool()

Implementation

RenderableObject getNextObjectInPool() {
  if (_objectCount == _objectPoolLength) {
    RenderableObject object = RenderableObject();
    _objectPool.add(object);
    _objectPoolLength++;
    _objectCount++;
    return object;
  }
  return _objectPool[_objectCount++];
}