diff --git a/Svelto.ECS/EGID.cs b/Svelto.ECS/EGID.cs index 7f1e385..7656ffe 100644 --- a/Svelto.ECS/EGID.cs +++ b/Svelto.ECS/EGID.cs @@ -28,7 +28,7 @@ namespace Svelto.ECS public EGID(int entityID) : this() { - _GID = MAKE_GLOBAL_ID(entityID, ExclusiveGroups.StandardEntity); + _GID = MAKE_GLOBAL_ID(entityID, ExclusiveGroup.StandardEntitiesGroup); } static long MAKE_GLOBAL_ID(int entityId, int groupId) diff --git a/Svelto.ECS/EnginesRoot.Engines.cs b/Svelto.ECS/EnginesRoot.Engines.cs index f29aadf..e12b326 100644 --- a/Svelto.ECS/EnginesRoot.Engines.cs +++ b/Svelto.ECS/EnginesRoot.Engines.cs @@ -39,7 +39,7 @@ namespace Svelto.ECS _otherEngines = new FasterList(); _groupEntityDB = new Dictionary>(); - _groupEntityDB[ExclusiveGroups.StandardEntity] = new Dictionary(); + _groupEntityDB[ExclusiveGroup.StandardEntitiesGroup] = new Dictionary(); _groupedEntityToAdd = new DoubleBufferedEntityViews>>(); diff --git a/Svelto.ECS/EnginesRoot.GenericEntityFactory.cs b/Svelto.ECS/EnginesRoot.GenericEntityFactory.cs index 237642c..6fc3881 100644 --- a/Svelto.ECS/EnginesRoot.GenericEntityFactory.cs +++ b/Svelto.ECS/EnginesRoot.GenericEntityFactory.cs @@ -20,7 +20,7 @@ namespace Svelto.ECS return _weakEngine.Target.BuildEntity(new EGID(entityID), implementors); } - public EntityStructInitializer BuildEntity(int entityID, ExclusiveGroups groupID, object[] implementors) where T : IEntityDescriptor, new() + public EntityStructInitializer BuildEntity(int entityID, ExclusiveGroup groupID, object[] implementors) where T : IEntityDescriptor, new() { return _weakEngine.Target.BuildEntity(new EGID(entityID, (int)groupID), implementors); } @@ -40,17 +40,17 @@ namespace Svelto.ECS return _weakEngine.Target.BuildEntity(egid, entityToBuild, implementors); } - public EntityStructInitializer BuildEntity(int entityID, ExclusiveGroups groupID, IEntityBuilder[] entityToBuild, object[] implementors) + public EntityStructInitializer BuildEntity(int entityID, ExclusiveGroup groupID, IEntityBuilder[] entityToBuild, object[] implementors) { return _weakEngine.Target.BuildEntity(new EGID(entityID, (int)groupID), entityToBuild, implementors); } public void PreallocateEntitySpace(int size) where T : IEntityDescriptor, new() { - _weakEngine.Target.Preallocate(ExclusiveGroups.StandardEntity, size); + _weakEngine.Target.Preallocate(ExclusiveGroup.StandardEntitiesGroup, size); } - public void PreallocateEntitySpace(ExclusiveGroups groupID, int size) where T : IEntityDescriptor, new() + public void PreallocateEntitySpace(ExclusiveGroup groupID, int size) where T : IEntityDescriptor, new() { _weakEngine.Target.Preallocate((int)groupID, size); } diff --git a/Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs b/Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs index d45cd11..23f3c70 100644 --- a/Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs +++ b/Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs @@ -42,14 +42,14 @@ namespace Svelto.ECS _weakReference.Target.SwapEntityGroup(entityID, fromGroupID, toGroupID); } - public void SwapEntityGroup(EGID id, int toGroupID = ExclusiveGroups.StandardEntity) + public void SwapEntityGroup(EGID id, int toGroupID = ExclusiveGroup.StandardEntitiesGroup) { _weakReference.Target.SwapEntityGroup(id.entityID, id.groupID, toGroupID); } public void SwapEntityGroup(int entityID, int toGroupID) { - _weakReference.Target.SwapEntityGroup(entityID, ExclusiveGroups.StandardEntity, toGroupID); + _weakReference.Target.SwapEntityGroup(entityID, ExclusiveGroup.StandardEntitiesGroup, toGroupID); } public EGID SwapFirstEntityGroup(int fromGroupID, int toGroupID) diff --git a/Svelto.ECS/EntitiesDB.cs b/Svelto.ECS/EntitiesDB.cs index 60d6c3a..72ca4a9 100644 --- a/Svelto.ECS/EntitiesDB.cs +++ b/Svelto.ECS/EntitiesDB.cs @@ -14,7 +14,7 @@ namespace Svelto.ECS.Internal public ReadOnlyCollectionStruct QueryEntityViews() where T:class, IEntityStruct { - return QueryEntityViews(ExclusiveGroups.StandardEntity); + return QueryEntityViews(ExclusiveGroup.StandardEntitiesGroup); } public ReadOnlyCollectionStruct QueryEntityViews(int @group) where T:class, IEntityStruct @@ -33,7 +33,7 @@ namespace Svelto.ECS.Internal public T[] QueryEntities(out int count) where T : IEntityStruct { - return QueryEntities(ExclusiveGroups.StandardEntity, out count); + return QueryEntities(ExclusiveGroup.StandardEntitiesGroup, out count); } public T[] QueryEntities(int @group, out int count) where T : IEntityStruct diff --git a/Svelto.ECS/ExclusiveGroups.cs b/Svelto.ECS/ExclusiveGroups.cs index cbeb58d..e02a001 100644 --- a/Svelto.ECS/ExclusiveGroups.cs +++ b/Svelto.ECS/ExclusiveGroups.cs @@ -1,15 +1,15 @@ namespace Svelto.ECS { - public class ExclusiveGroups + public class ExclusiveGroup { - internal const int StandardEntity = int.MaxValue; + internal const int StandardEntitiesGroup = int.MaxValue; - public ExclusiveGroups() + public ExclusiveGroup() { _id = _globalId++; } - public static explicit operator int(ExclusiveGroups group) // explicit byte to digit conversion operator + public static explicit operator int(ExclusiveGroup group) // explicit byte to digit conversion operator { return group._id; } diff --git a/Svelto.ECS/IEntityFactory.cs b/Svelto.ECS/IEntityFactory.cs index 72da9f1..084d4ee 100644 --- a/Svelto.ECS/IEntityFactory.cs +++ b/Svelto.ECS/IEntityFactory.cs @@ -23,7 +23,7 @@ namespace Svelto.ECS /// /// void PreallocateEntitySpace(int size) where T : IEntityDescriptor, new(); - void PreallocateEntitySpace(ExclusiveGroups groupID, int size) where T : IEntityDescriptor, new(); + void PreallocateEntitySpace(ExclusiveGroup groupID, int size) where T : IEntityDescriptor, new(); /// /// The EntityDescriptor doesn't need to be ever instantiated. It just describes the Entity @@ -47,7 +47,7 @@ namespace Svelto.ECS /// /// /// - EntityStructInitializer BuildEntity(int entityID, ExclusiveGroups groupID, object[] implementors) where T:IEntityDescriptor, new(); + EntityStructInitializer BuildEntity(int entityID, ExclusiveGroup groupID, object[] implementors) where T:IEntityDescriptor, new(); EntityStructInitializer BuildEntity(EGID egid, object[] implementors) where T:IEntityDescriptor, new(); @@ -59,7 +59,7 @@ namespace Svelto.ECS /// /// /// - EntityStructInitializer BuildEntity(int entityID, ExclusiveGroups groupID, IEntityBuilder[] entityToBuild, object[] implementors); + EntityStructInitializer BuildEntity(int entityID, ExclusiveGroup groupID, IEntityBuilder[] entityToBuild, object[] implementors); EntityStructInitializer BuildEntity(int entityID, IEntityBuilder[] entityToBuild, object[] implementors); EntityStructInitializer BuildEntity(EGID egid, IEntityBuilder[] entityToBuild, object[] implementors); } diff --git a/Svelto.ECS/IEntityFunctions.cs b/Svelto.ECS/IEntityFunctions.cs index b8426ff..e55c9bc 100644 --- a/Svelto.ECS/IEntityFunctions.cs +++ b/Svelto.ECS/IEntityFunctions.cs @@ -13,9 +13,9 @@ namespace Svelto.ECS void RemoveGroupAndEntities(int groupID); - void SwapEntityGroup(int entityID, int fromGroupID, int toGroupID = ExclusiveGroups.StandardEntity); - void SwapEntityGroup(EGID id, int toGroupID = ExclusiveGroups.StandardEntity); + void SwapEntityGroup(int entityID, int fromGroupID, int toGroupID = ExclusiveGroup.StandardEntitiesGroup); + void SwapEntityGroup(EGID id, int toGroupID = ExclusiveGroup.StandardEntitiesGroup); void SwapEntityGroup(int entityID, int toGroupID); - EGID SwapFirstEntityGroup(int fromGroupID = ExclusiveGroups.StandardEntity, int toGroupID = ExclusiveGroups.StandardEntity); + EGID SwapFirstEntityGroup(int fromGroupID = ExclusiveGroup.StandardEntitiesGroup, int toGroupID = ExclusiveGroup.StandardEntitiesGroup); } } \ No newline at end of file