Package dev.prozilla.pine.core.entity
Class EntityQuery
java.lang.Object
dev.prozilla.pine.core.entity.EntityQuery
- All Implemented Interfaces:
Lifecycle
Utility class for querying entities with specific components to be processed by a system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ArrayList
<EntityChunk> List of entities that match this query.boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Removes all component groups.void
boolean
void
print()
void
boolean
Checks if an entity matches this query and if it does, adds the entity to the array of matches.void
boolean
unregister
(Entity entity) Unregisters an entity in this query.
-
Field Details
-
Constructor Details
-
Method Details
-
destroy
public void destroy()Removes all component groups. -
startIteration
- Throws:
IllegalStateException
-
endIteration
- Throws:
IllegalStateException
-
register
Checks if an entity matches this query and if it does, adds the entity to the array of matches.- Returns:
- True if the entity matches this query
-
unregister
Unregisters an entity in this query.- Parameters:
entity
- The entity- Returns:
- True if this query was affected.
-
hasEntityChunks
public boolean hasEntityChunks() -
print
public void print() -
print
-