public void ensureCapacity(int newSize) { typeFactory.initialMapperCapacity = newSize; entityToIdentity.ensureCapacity(newSize); for (ComponentMapper mapper : mappers) { mapper.components.ensureCapacity(newSize); } }
public void ensureCapacity(int newSize) { typeFactory.initialMapperCapacity = newSize; entityToIdentity.ensureCapacity(newSize); for (ComponentMapper mapper : mappers) { mapper.components.ensureCapacity(newSize); } }
public void ensureCapacity(int newSize) { typeFactory.initialMapperCapacity = newSize; entityToIdentity.ensureCapacity(newSize); for (ComponentMapper mapper : mappers) { mapper.components.ensureCapacity(newSize); } }
void registerComponentType(ComponentType ct, int capacity) { int index = ct.getIndex(); ComponentMapper mapper = new ComponentMapper(ct.getType(), world); mapper.components.ensureCapacity(capacity); mappers.set(index, mapper); }
void registerComponentType(ComponentType ct, int capacity) { int index = ct.getIndex(); ComponentMapper mapper = new ComponentMapper(ct.getType(), world); mapper.components.ensureCapacity(capacity); mappers.set(index, mapper); }
/** Fetch mapper, or create if missing. */ @SuppressWarnings("unchecked") private <T extends Component> M<T> getCreateMapper(ComponentType type) { final int index = type.getIndex(); mappers.ensureCapacity(index); M m = mappers.get(index); if (m == null) { m = setMapper(index, type.getType()); } return m; }
void registerComponentType(ComponentType ct, int capacity) { int index = ct.getIndex(); ComponentMapper mapper = new ComponentMapper(ct.getType(), world); mapper.components.ensureCapacity(capacity); mappers.set(index, mapper); }
/** Fetch mapper, or create if missing. */ @SuppressWarnings("unchecked") private <T extends Component> M<T> getCreateMapper(ComponentType type) { final int index = type.getIndex(); mappers.ensureCapacity(index); M m = mappers.get(index); if (m == null) { m = setMapper(index, type.getType()); } return m; }
private void growEntityStores() { int newSize = 2 * entities.getCapacity(); entities.ensureCapacity(newSize); ComponentManager cm = world.getComponentManager(); cm.ensureCapacity(newSize); for (int i = 0, s = entityBitVectors.size(); s > i; i++) { entityBitVectors.get(i).ensureCapacity(newSize); } }
private void growEntityStores() { int newSize = 2 * entities.getCapacity(); entities.ensureCapacity(newSize); ComponentManager cm = world.getComponentManager(); cm.ensureCapacity(newSize); for (int i = 0, s = entityBitVectors.size(); s > i; i++) { entityBitVectors.get(i).ensureCapacity(newSize); } }