diff options
Diffstat (limited to 'doc/classes/SceneTree.xml')
-rw-r--r-- | doc/classes/SceneTree.xml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 72a42202c7..7a15153fc2 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -5,7 +5,7 @@ </brief_description> <description> As one of the most important classes, the [SceneTree] manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. - You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. a "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. + You can also use the [SceneTree] to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. [SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop. </description> <tutorials> @@ -21,7 +21,8 @@ <argument index="1" name="method" type="StringName"> </argument> <description> - Calls [code]method[/code] on each member of the given group. + Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. + [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. </description> </method> <method name="call_group_flags" qualifiers="vararg"> @@ -34,7 +35,8 @@ <argument index="2" name="method" type="StringName"> </argument> <description> - Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. + Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. + [b]Note:[/b] Group call flags are used to control the method calling behavior. If the [constant GROUP_CALL_REALTIME] flag is present in the [code]flags[/code] argument, methods will be called immediately. If this flag isn't present in [code]flags[/code], methods will be called with a one-frame delay in a way similar to [method call_group]. </description> </method> <method name="change_scene"> @@ -88,6 +90,14 @@ The timer will be automatically freed after its time elapses. </description> </method> + <method name="get_first_node_in_group"> + <return type="Node"> + </return> + <argument index="0" name="group" type="StringName"> + </argument> + <description> + </description> + </method> <method name="get_frame" qualifiers="const"> <return type="int"> </return> @@ -197,6 +207,7 @@ Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). + [b]Note:[/b] On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button. </description> </method> <method name="reload_current_scene"> |