simplifying the way to get Enumerator.

This commit is contained in:
Mikhail 2023-03-30 01:23:18 +08:00
parent cb121b8397
commit a215d7702a

View File

@ -371,7 +371,7 @@ namespace DCFApixels.DragonECS
Type targetType = typeof(Activator<,>).MakeGenericType(typeof(TWorldArchetype), sortedIncType, sortedExcType);
if(targetType != thisType)
if (targetType != thisType)
{
instance = (EcsMask)targetType.GetField(nameof(instance), BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(null);
return;
@ -449,6 +449,11 @@ namespace DCFApixels.DragonECS
_entities.Remove(entityID);
}
#endregion
#region GetEnumerator
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public EcsGroup.Enumerator GetEnumerator() => _entities.GetEnumerator();
#endregion
}
#endregion
}