mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
optimize GetComponents debug method
This commit is contained in:
parent
ec4142bc7d
commit
b910c9d0e2
@ -628,7 +628,10 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
list.Clear();
|
list.Clear();
|
||||||
var itemsCount = GetComponentsCount(entityID);
|
var itemsCount = GetComponentsCount(entityID);
|
||||||
|
if (itemsCount <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
int poolIndex = entityID;
|
int poolIndex = entityID;
|
||||||
uint bit;
|
uint bit;
|
||||||
for (int chunkIndex = 0; chunkIndex < _entityComponentMaskLength; chunkIndex++)
|
for (int chunkIndex = 0; chunkIndex < _entityComponentMaskLength; chunkIndex++)
|
||||||
@ -663,7 +666,10 @@ namespace DCFApixels.DragonECS
|
|||||||
{
|
{
|
||||||
typeSet.Clear();
|
typeSet.Clear();
|
||||||
var itemsCount = GetComponentsCount(entityID);
|
var itemsCount = GetComponentsCount(entityID);
|
||||||
|
if(itemsCount <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
int poolIndex = entityID;
|
int poolIndex = entityID;
|
||||||
uint bit;
|
uint bit;
|
||||||
for (int chunkIndex = 0; chunkIndex < _entityComponentMaskLength; chunkIndex++)
|
for (int chunkIndex = 0; chunkIndex < _entityComponentMaskLength; chunkIndex++)
|
||||||
|
Loading…
Reference in New Issue
Block a user