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