findEntity
findEntity(
world,predictedQuery,test?):Entity|undefined
The first entity query matches that passes test, in the order
world.query lists them, or the first of all with no test, building no
array. test reads and never writes: the list it walks is live.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
predictedQuery |
Query | PredictedQuery<EngineQueryParameter[]> |
test? |
(entity) => boolean |
Returns
Section titled “Returns”Entity | undefined