Exemple #1
0
        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);
        }
Exemple #2
0
 public Context(int componentTypeCount) : this(componentTypeCount, 100000)
 {
     contextId = contextIdGenerator++;
     this.componentTypeCount = componentTypeCount;
     ComponentTypeIdsPerContext.SetContext(contextId, componentTypeCount);
 }