private int GetContextComponentTypeId(int componentTypeId) { var index = ComponentTypeIdsPerContext.GetTypeId(contextId, componentTypeId); if (index == -1) { throw new System.Exception("Entity can't handle more component types"); } return(index); }
public Context(int componentTypeCount) : this(componentTypeCount, 100000) { contextId = contextIdGenerator++; this.componentTypeCount = componentTypeCount; ComponentTypeIdsPerContext.SetContext(contextId, componentTypeCount); }