summaryrefslogtreecommitdiff
path: root/doc/classes/Node.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Node.xml')
-rw-r--r--doc/classes/Node.xml24
1 files changed, 20 insertions, 4 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index d8ad65082f..d9732da3a3 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -179,9 +179,14 @@
<return type="Tween" />
<description>
Creates a new [Tween] and binds it to this node. This is equivalent of doing:
- [codeblock]
+ [codeblocks]
+ [gdscript]
get_tree().create_tween().bind_node(self)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GetTree().CreateTween().BindNode(this);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -267,13 +272,24 @@
Returns an array listing the groups that the node is a member of.
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
[b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Stores the node's non-internal groups only (as an array of Strings).
var non_internal_groups = []
for group in get_groups():
if not group.begins_with("_"):
non_internal_groups.push_back(group)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Stores the node's non-internal groups only (as a List of strings).
+ List&lt;string&gt; nonInternalGroups = new List&lt;string&gt;();
+ foreach (string group in GetGroups())
+ {
+ if (!group.BeginsWith("_"))
+ nonInternalGroups.Add(group);
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_index" qualifiers="const">