2023-07-10 17:18:30 +00:00
|
|
|
namespace MfGames.Gallium;
|
|
|
|
|
|
|
|
public static class WhereEntityNotHasExtensions
|
|
|
|
{
|
2024-03-06 05:15:03 +00:00
|
|
|
public static IEnumerable<Entity> WhereEntityNotHas<T1>(this IEnumerable<Entity> entities)
|
|
|
|
{
|
|
|
|
return entities.Where(x => !x.Has<T1>());
|
|
|
|
}
|
2023-07-10 17:18:30 +00:00
|
|
|
|
2024-03-06 05:15:03 +00:00
|
|
|
public static IEnumerable<Entity> WhereEntityNotHasAll<T1, T2>(
|
|
|
|
this IEnumerable<Entity> entities
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return entities.Where(x => !x.HasAll<T1, T2>());
|
|
|
|
}
|
2023-07-10 17:18:30 +00:00
|
|
|
|
2024-03-06 05:15:03 +00:00
|
|
|
public static IEnumerable<Entity> WhereEntityNotHasAll<T1, T2, T3>(
|
|
|
|
this IEnumerable<Entity> entities
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return entities.Where(x => !x.HasAll<T1, T2, T3>());
|
|
|
|
}
|
2023-07-10 17:18:30 +00:00
|
|
|
|
2024-03-06 05:15:03 +00:00
|
|
|
public static IEnumerable<Entity> WhereEntityNotHasAll<T1, T2, T3, T4>(
|
|
|
|
this IEnumerable<Entity> entities
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return entities.Where(x => !x.HasAll<T1, T2, T3, T4>());
|
|
|
|
}
|
2023-07-10 17:18:30 +00:00
|
|
|
}
|