File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -333,8 +333,18 @@ extends System
333333func sub_systems():
334334 return [
335335 # [query, callable] - all use same unified process signature
336- [ECS.world.query.with_all([C_Health, C_Damage]), damage_entities],
337- [ECS.world.query.with_all([C_Health]).with_none([C_Dead]).iterate([C_Health]), regenerate_health]
336+ [
337+ q
338+ .with_all([C_Health, C_Damage]),
339+ damage_entities
340+ ],
341+ [
342+ q
343+ .with_all([C_Health])
344+ .with_none([C_Dead])
345+ .iterate([C_Health]),
346+ regenerate_health
347+ ]
338348 ]
339349
340350func damage_entities(entities: Array[Entity], components: Array, delta: float):
@@ -406,6 +416,7 @@ ECS.world.query
406416 .with_relationship([r_attacking_player]) # Must have these relationships
407417 .without_relationship([r_fleeing]) # Must not have these relationships
408418 .with_reverse_relationship([r_parent_of]) # Must be target of these relationships
419+ .iterate([C_Health]) # Fetch these components and add to components array for quick iteration
409420```
410421
411422### Query Methods
You can’t perform that action at this time.
0 commit comments