mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix
This commit is contained in:
parent
50ea02f967
commit
9e865ffdbe
@ -294,17 +294,6 @@ namespace DCFApixels.DragonECS
|
|||||||
internal Type WorldArchetypeType;
|
internal Type WorldArchetypeType;
|
||||||
internal int[] Inc;
|
internal int[] Inc;
|
||||||
internal int[] Exc;
|
internal int[] Exc;
|
||||||
|
|
||||||
internal int IncCount
|
|
||||||
{
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
get => Inc.Length;
|
|
||||||
}
|
|
||||||
internal int ExcCount
|
|
||||||
{
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
||||||
get => Exc.Length;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,10 +173,7 @@ namespace DCFApixels.DragonECS
|
|||||||
var mask = _queries[uniqueID].Mask;
|
var mask = _queries[uniqueID].Mask;
|
||||||
var filter = (EcsQueryBase)_queries[uniqueID];
|
var filter = (EcsQueryBase)_queries[uniqueID];
|
||||||
|
|
||||||
((EcsQuery<TWorldArchetype>)_queries[uniqueID]).group = new EcsGroup(this);
|
for (int i = 0; i < mask.Inc.Length; i++)
|
||||||
((EcsQuery<TWorldArchetype>)_queries[uniqueID]).mask = mask;
|
|
||||||
|
|
||||||
for (int i = 0; i < mask.IncCount; i++)
|
|
||||||
{
|
{
|
||||||
int componentID = mask.Inc[i];
|
int componentID = mask.Inc[i];
|
||||||
var list = _filtersByIncludedComponents[componentID];
|
var list = _filtersByIncludedComponents[componentID];
|
||||||
@ -188,7 +185,7 @@ namespace DCFApixels.DragonECS
|
|||||||
list.Add(filter);
|
list.Add(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < mask.ExcCount; i++)
|
for (int i = 0; i < mask.Exc.Length; i++)
|
||||||
{
|
{
|
||||||
int componentID = mask.Exc[i];
|
int componentID = mask.Exc[i];
|
||||||
var list = _filtersByExcludedComponents[componentID];
|
var list = _filtersByExcludedComponents[componentID];
|
||||||
@ -230,12 +227,12 @@ namespace DCFApixels.DragonECS
|
|||||||
if (mask.WorldArchetypeType != typeof(TWorldArchetype))
|
if (mask.WorldArchetypeType != typeof(TWorldArchetype))
|
||||||
throw new EcsFrameworkException("mask.WorldArchetypeType != typeof(TWorldArchetype)");
|
throw new EcsFrameworkException("mask.WorldArchetypeType != typeof(TWorldArchetype)");
|
||||||
#endif
|
#endif
|
||||||
for (int i = 0, iMax = mask.IncCount; i < iMax; i++)
|
for (int i = 0, iMax = mask.Inc.Length; i < iMax; i++)
|
||||||
{
|
{
|
||||||
if (!_pools[mask.Inc[i]].Has(entity))
|
if (!_pools[mask.Inc[i]].Has(entity))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int i = 0, iMax = mask.ExcCount; i < iMax; i++)
|
for (int i = 0, iMax = mask.Exc.Length; i < iMax; i++)
|
||||||
{
|
{
|
||||||
if (_pools[mask.Exc[i]].Has(entity))
|
if (_pools[mask.Exc[i]].Has(entity))
|
||||||
return false;
|
return false;
|
||||||
@ -249,13 +246,13 @@ namespace DCFApixels.DragonECS
|
|||||||
if (mask.WorldArchetypeType != typeof(TWorldArchetype))
|
if (mask.WorldArchetypeType != typeof(TWorldArchetype))
|
||||||
throw new EcsFrameworkException("mask.WorldArchetypeType != typeof(TWorldArchetype)");
|
throw new EcsFrameworkException("mask.WorldArchetypeType != typeof(TWorldArchetype)");
|
||||||
#endif
|
#endif
|
||||||
for (int i = 0, iMax = mask.IncCount; i < iMax; i++)
|
for (int i = 0, iMax = mask.Inc.Length; i < iMax; i++)
|
||||||
{
|
{
|
||||||
int componentID = mask.Inc[i];
|
int componentID = mask.Inc[i];
|
||||||
if (componentID == otherComponentID || !_pools[componentID].Has(entity))
|
if (componentID == otherComponentID || !_pools[componentID].Has(entity))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int i = 0, iMax = mask.ExcCount; i < iMax; i++)
|
for (int i = 0, iMax = mask.Exc.Length; i < iMax; i++)
|
||||||
{
|
{
|
||||||
int componentID = mask.Exc[i];
|
int componentID = mask.Exc[i];
|
||||||
if (componentID != otherComponentID && _pools[componentID].Has(entity))
|
if (componentID != otherComponentID && _pools[componentID].Has(entity))
|
||||||
|
Loading…
Reference in New Issue
Block a user