Closed davidB closed 11 years ago
En return null if the components isn't available
Component _getComponent(Entity e, ComponentType type) { int index = type.id; Bag<Component> components = _componentsByType[index]; if(components != null && components.isIndexWithinBounds(e.id)) { //<-- checkIndex return components[e.id]; } return null;
Good catch. You're really going into detail ;)
En return null if the components isn't available