mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
fix
This commit is contained in:
parent
5e9870f736
commit
d0c2cab838
@ -917,7 +917,6 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
var count = GetComponentsCount(entityID);
|
||||
|
||||
|
||||
if (count <= 0)
|
||||
{
|
||||
list.Clear();
|
||||
@ -937,7 +936,14 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
GetComponentTypeIDsFor_Internal(entityID, poolIdsPtr, count);
|
||||
|
||||
if (list.Count != count)
|
||||
if (list.Count == count)
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
list[i] = _pools[poolIdsPtr[i]];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Clear();
|
||||
for (int i = 0; i < count; i++)
|
||||
@ -945,13 +951,6 @@ namespace DCFApixels.DragonECS
|
||||
list.Add(_pools[poolIdsPtr[i]]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
list[i] = _pools[poolIdsPtr[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
public void GetComponentsFor(int entityID, List<object> list)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user