mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 02:24:37 +08:00
simplifying the way to get Enumerator.
This commit is contained in:
parent
cb121b8397
commit
a215d7702a
@ -371,7 +371,7 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
Type targetType = typeof(Activator<,>).MakeGenericType(typeof(TWorldArchetype), sortedIncType, sortedExcType);
|
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);
|
instance = (EcsMask)targetType.GetField(nameof(instance), BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetValue(null);
|
||||||
return;
|
return;
|
||||||
@ -449,6 +449,11 @@ namespace DCFApixels.DragonECS
|
|||||||
_entities.Remove(entityID);
|
_entities.Remove(entityID);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region GetEnumerator
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public EcsGroup.Enumerator GetEnumerator() => _entities.GetEnumerator();
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user