This commit is contained in:
Booklordofthedings 2024-11-19 21:11:12 +01:00
parent bc8926725a
commit 40d50bbda9
2 changed files with 3 additions and 2 deletions

View file

@ -24,7 +24,8 @@ class EntityManager
if(_entities.Count + 1 > Entity.IndexMask)
return .Null; //It would be beneficial if we could avoid this check
#endif
return .((.)_entities..Add(.((.)_entities.Count, 0)).Count, 0);
_entities.Add(Entity((.)_entities.Count,0));
return _entities.Back;
}
else
{

View file

@ -45,7 +45,7 @@ abstract class System
//We now have the list of entities to loop through
Span<Entity> entities = ecs.Components.Components[comp].GetAll();
UList main = ecs.Components.Components[comp].[Friend]_packedEntities;
var cun = entities.Length - 1;
var cun = entities.Length;
#region DumbStatement
switch (_Components.Count)