using System.Runtime.CompilerServices;
namespace Ghost.Entities;
public ref partial struct QueryBuilder
{
///
/// Adds the specified component type(s) to the 'All' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAll()
where T0 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'All' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAllRW()
where T0 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Any' filter of the query.
/// Targets entities that have at least one of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAny()
where T0 : unmanaged, IComponent
{
_any.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Absent' filter of the query.
/// Targets entities that do not have any of the specified component types.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAbsent()
where T0 : unmanaged, IComponent
{
_absent.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'None' filter of the query.
/// Targets entities that do not have any of the specified component types, or those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithNone()
where T0 : unmanaged, IComponent
{
_none.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Disabled' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithDisabled()
where T0 : unmanaged, IEnableableComponent
{
_disabled.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresent()
where T0 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresentRW()
where T0 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'All' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAll()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'All' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAllRW()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Any' filter of the query.
/// Targets entities that have at least one of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAny()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_any.Add(ComponentTypeID.Value);
_any.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Absent' filter of the query.
/// Targets entities that do not have any of the specified component types.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAbsent()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_absent.Add(ComponentTypeID.Value);
_absent.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'None' filter of the query.
/// Targets entities that do not have any of the specified component types, or those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithNone()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_none.Add(ComponentTypeID.Value);
_none.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Disabled' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithDisabled()
where T0 : unmanaged, IEnableableComponent
where T1 : unmanaged, IEnableableComponent
{
_disabled.Add(ComponentTypeID.Value);
_disabled.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresent()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresentRW()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'All' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAll()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'All' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAllRW()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_all.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Any' filter of the query.
/// Targets entities that have at least one of the specified component types and those component(s) must be enabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAny()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_any.Add(ComponentTypeID.Value);
_any.Add(ComponentTypeID.Value);
_any.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Absent' filter of the query.
/// Targets entities that do not have any of the specified component types.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithAbsent()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_absent.Add(ComponentTypeID.Value);
_absent.Add(ComponentTypeID.Value);
_absent.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'None' filter of the query.
/// Targets entities that do not have any of the specified component types, or those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithNone()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_none.Add(ComponentTypeID.Value);
_none.Add(ComponentTypeID.Value);
_none.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Disabled' filter of the query.
/// Targets entities that have all of the specified component types and those component(s) are disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithDisabled()
where T0 : unmanaged, IEnableableComponent
where T1 : unmanaged, IEnableableComponent
where T2 : unmanaged, IEnableableComponent
{
_disabled.Add(ComponentTypeID.Value);
_disabled.Add(ComponentTypeID.Value);
_disabled.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresent()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
return this;
}
///
/// Adds the specified component type(s) to the 'Present' filter of the query and requires read-write access.
/// Targets entities that have all of the specified component types, regardless of whether those component(s) are enabled or disabled.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public QueryBuilder WithPresentRW()
where T0 : unmanaged, IComponent
where T1 : unmanaged, IComponent
where T2 : unmanaged, IComponent
{
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
_present.Add(ComponentTypeID.Value);
_rw.Add(ComponentTypeID.Value);
return this;
}
}