Check whether an entity has any detected targets.
ECS world instance
Entity with a detector component
true if detectedEntities contains at least one entry
if (hasDetectedTargets(ecs, guardId)) { // transition to chase} Copy
if (hasDetectedTargets(ecs, guardId)) { // transition to chase}
Check whether an entity has any detected targets.