Files
RobustToolbox/Robust.Shared/GameObjects/IEntityQuery.cs
Acruid 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00

26 lines
996 B
C#

using System.Collections.Generic;
namespace Robust.Shared.GameObjects
{
/// <summary>
/// An entity query is a type that can filter entities based on certain criteria,
/// for example based on the components that the entity has.
/// </summary>
public interface IEntityQuery
{
/// <summary>
/// Match the entity and see if it passes the criteria.
/// </summary>
/// <param name="entity">The entity to test.</param>
/// <returns>True if the entity is included in this query, false otherwise</returns>
bool Match(IEntity entity);
/// <summary>
/// Matches every entity in an EntityManager to see if it passes the criteria.
/// </summary>
/// <param name="entityMan">An EntityManager containing a set of entities.</param>
/// <returns>Enumeration of all entities that successfully matched the criteria.</returns>
IEnumerable<IEntity> Match(IEntityManager entityMan);
}
}