You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The abstract base class for different query-like builders.
5
6
</brief_description>
@@ -78,6 +79,28 @@
78
79
The term added is identified by a [Variant] coerced to an ID. To learn more about [Variant] coercion see [method GFWorld.coerce_id].
79
80
</description>
80
81
</method>
82
+
<methodname="src">
83
+
<returntype="GFQuerylikeBuilder" />
84
+
<paramindex="0"name="entity"type="Variant" />
85
+
<description>
86
+
Sets the source of the most recently added term. Setting the source allows for matching terms against a specific entity. [url=https://www.flecs.dev/flecs/md_docs_2Queries.html#source]More about Flecs sources[/url].
87
+
Example:
88
+
[codeblock]
89
+
var Velocity = GFComponentBuilder.new() \
90
+
.add_member("velocity", TYPE_VECTOR2) \
91
+
.build()
92
+
var ship = GFEntity.new() \
93
+
.add(Velocity)
94
+
var asteroid = GFEntity.new() \
95
+
.add(Velocity)
96
+
97
+
# Query only for Velocity of the ship, not the asteroid
0 commit comments