diff options
-rw-r--r-- | doc/classes/Node.xml | 125 |
1 files changed, 73 insertions, 52 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 08b761abe8..eb4ab3e1fb 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -43,6 +43,7 @@ </argument> <description> Called when there is a change to input devices. Propagated through the node tree until a Node consumes it. + It is only called if input processing is enabled, which is done automatically if this method is overriden, and can be toggled with [method set_process_input]. </description> </method> <method name="_physics_process" qualifiers="virtual"> @@ -52,7 +53,7 @@ </argument> <description> Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. - It is only called if physics processing has been enabled with [method set_physics_process]. + It is only called if physics processing is enabled, which is done automatically if this method is overriden, and can be toggled with [method set_physics_process]. Corresponds to the NOTIFICATION_PHYSICS_PROCESS notification in [method Object._notification]. </description> </method> @@ -63,7 +64,7 @@ </argument> <description> Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. - It is only called if processing has been enabled with [method set_process]. + It is only called if processing is enabled, which is done automatically if this method is overriden, and can be toggled with [method set_process]. Corresponds to the NOTIFICATION_PROCESS notification in [method Object._notification]. </description> </method> @@ -82,6 +83,7 @@ </argument> <description> Propagated to all nodes when the previous InputEvent is not consumed by any nodes. + It is only called if unhandled input processing is enabled, which is done automatically if this method is overriden, and can be toggled with [method set_process_unhandled_input]. </description> </method> <method name="_unhandled_key_input" qualifiers="virtual"> @@ -154,7 +156,7 @@ <argument index="2" name="owned" type="bool" default="true"> </argument> <description> - Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. </description> </method> <method name="get_child" qualifiers="const"> @@ -163,55 +165,56 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. + Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. </description> </method> <method name="get_child_count" qualifiers="const"> <return type="int"> </return> <description> - Return the amount of child nodes. + Returns the amount of child nodes. </description> </method> <method name="get_children" qualifiers="const"> <return type="Array"> </return> <description> - Return an array of references ([code]Node[/code]) to the child nodes. + Returns an array of references ([code]Node[/code]) to the child nodes. </description> </method> <method name="get_filename" qualifiers="const"> <return type="String"> </return> <description> - Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]). + Returns a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see [method set_filename]). </description> </method> <method name="get_groups" qualifiers="const"> <return type="Array"> </return> <description> - Return an array listing the groups that the node is part of. + Returns an array listing the groups that the node is part of. </description> </method> <method name="get_index" qualifiers="const"> <return type="int"> </return> <description> - Get the node index, i.e. its position among the siblings of its parent. + Returns the node index, i.e. its position among the siblings of its parent. </description> </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> <description> - Return the name of the node. This name is unique among the siblings (other child nodes from the same parent). + Returns the name of the node. This name is unique among the siblings (other child nodes from the same parent). </description> </method> <method name="get_network_master" qualifiers="const"> <return type="int"> </return> <description> + Returns the peer ID of the network master for this node. </description> </method> <method name="get_node" qualifiers="const"> @@ -220,7 +223,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Fetch a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. + Fetches a node. The [NodePath] must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. Note: fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). [i]Example:[/i] Assume your current node is Character and the following tree: [codeblock] @@ -254,21 +257,21 @@ <return type="Node"> </return> <description> - Get the node owner (see [method set_owner]). + Returns the node owner (see [method set_owner]). </description> </method> <method name="get_parent" qualifiers="const"> <return type="Node"> </return> <description> - Return the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent. + Returns the parent node of the current node, or an empty [code]Node[/code] if the node lacks a parent. </description> </method> <method name="get_path" qualifiers="const"> <return type="NodePath"> </return> <description> - Return the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]). + Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]). </description> </method> <method name="get_path_to" qualifiers="const"> @@ -277,28 +280,28 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. + Returns the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. </description> </method> <method name="get_physics_process_delta_time" qualifiers="const"> <return type="float"> </return> <description> - Return the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed in [OS]. + Returns the time elapsed since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed in [OS]. </description> </method> <method name="get_position_in_parent" qualifiers="const"> <return type="int"> </return> <description> - Return the order in the node tree branch, i.e. if called by the first child Node, return 0. + Returns the order in the node tree branch, i.e. if called by the first child Node, return 0. </description> </method> <method name="get_process_delta_time" qualifiers="const"> <return type="float"> </return> <description> - Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. + Returns the time elapsed (in seconds) since the last process callback. This is almost always different each time. </description> </method> <method name="get_scene_instance_load_placeholder" qualifiers="const"> @@ -311,13 +314,14 @@ <return type="SceneTree"> </return> <description> - Return a [SceneTree] that this node is inside. + Returns the [SceneTree] that this node is inside. </description> </method> <method name="get_viewport" qualifiers="const"> <return type="Viewport"> </return> <description> + Returns the [Viewport] for this node. </description> </method> <method name="has_node" qualifiers="const"> @@ -326,7 +330,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Return whether the node that a given [NodePath] points too exists. + Returns [code]true[/code] if the node that the [NodePath] points to exists. </description> </method> <method name="has_node_and_resource" qualifiers="const"> @@ -343,7 +347,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Return [i]true[/i] if the "node" argument is a direct or indirect child of the current node, otherwise return [i]false[/i]. + Returns [code]true[/code] if the "node" argument is a direct or indirect child of the current node, otherwise return [code]false[code]. </description> </method> <method name="is_greater_than" qualifiers="const"> @@ -352,7 +356,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Return [i]true[/i] if "node" occurs later in the scene hierarchy than the current node, otherwise return [i]false[/i]. + Returns [code]true[/code] if [code]node[/code] occurs later in the scene hierarchy than the current node, otherwise return [code]false[/code]. </description> </method> <method name="is_in_group" qualifiers="const"> @@ -361,14 +365,14 @@ <argument index="0" name="group" type="String"> </argument> <description> - Return whether this Node is in the specified group. + Returns [code]true[/code] if this Node is in the specified group. </description> </method> <method name="is_inside_tree" qualifiers="const"> <return type="bool"> </return> <description> - Return whether this Node is inside a [SceneTree]. + Returns [code]true[/code] if this Node is currently inside a [SceneTree]. </description> </method> <method name="is_network_master" qualifiers="const"> @@ -381,7 +385,7 @@ <return type="bool"> </return> <description> - Return true if physics processing is enabled (see [method set_physics_process]). + Returns [code]true[/code] if physics processing is enabled (see [method set_physics_process]). </description> </method> <method name="is_physics_processing_internal" qualifiers="const"> @@ -394,14 +398,14 @@ <return type="bool"> </return> <description> - Return whether processing is enabled in the current node (see [method set_process]). + Returns [code]true[/code] if processing is enabled (see [method set_process]). </description> </method> <method name="is_processing_input" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the node is processing input (see [method set_process_input]). + Returns [code]true[/code] if the node is processing input (see [method set_process_input]). </description> </method> <method name="is_processing_internal" qualifiers="const"> @@ -414,13 +418,14 @@ <return type="bool"> </return> <description> - Return true if the node is processing unhandled input (see [method set_process_unhandled_input]). + Returns [code]true[/code] if the node is processing unhandled input (see [method set_process_unhandled_input]). </description> </method> <method name="is_processing_unhandled_key_input" qualifiers="const"> <return type="bool"> </return> <description> + Returns [code]true[/code] if the node is processing unhandled key input (see [method set_process_unhandled_key_input]). </description> </method> <method name="move_child"> @@ -431,7 +436,7 @@ <argument index="1" name="to_position" type="int"> </argument> <description> - Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. + Moves a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. </description> </method> <method name="print_stray_nodes"> @@ -444,7 +449,7 @@ <return type="void"> </return> <description> - Print the scene to stdout. Used mainly for debugging purposes. + Prints the scene to stdout. Used mainly for debugging purposes. </description> </method> <method name="propagate_call"> @@ -480,14 +485,14 @@ <return type="void"> </return> <description> - Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. + Moves this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree. </description> </method> <method name="remove_and_skip"> <return type="void"> </return> <description> - Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. + Removes a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. </description> </method> <method name="remove_child"> @@ -496,7 +501,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Remove a child [code]Node[/code]. Node is NOT deleted and will have to be deleted manually. + Removes a child [code]Node[/code]. Node is NOT deleted and will have to be deleted manually. </description> </method> <method name="remove_from_group"> @@ -505,7 +510,7 @@ <argument index="0" name="group" type="String"> </argument> <description> - Remove a node from a group. + Removes a node from a group. </description> </method> <method name="replace_by"> @@ -516,14 +521,14 @@ <argument index="1" name="keep_data" type="bool" default="false"> </argument> <description> - Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. + Replaces a node in a scene by a given one. Subscriptions that pass through this node will be lost. </description> </method> <method name="request_ready"> <return type="void"> </return> <description> - Request that [code]_ready[/code] be called again. + Requests that [code]_ready[/code] be called again. </description> </method> <method name="rpc" qualifiers="vararg"> @@ -532,7 +537,7 @@ <argument index="0" name="method" type="String"> </argument> <description> - Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath]. + Sends a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same [NodePath]. </description> </method> <method name="rpc_config"> @@ -543,7 +548,7 @@ <argument index="1" name="mode" type="int" enum="Node.RPCMode"> </argument> <description> - Change the method's RPC mode (one of RPC_MODE_* constants). + Changes the method's RPC mode (one of RPC_MODE_* constants). </description> </method> <method name="rpc_id" qualifiers="vararg"> @@ -554,7 +559,7 @@ <argument index="1" name="method" type="String"> </argument> <description> - Send a [method rpc] to a specific peer identified by [i]peer_id[/i]. + Sends a [method rpc] to a specific peer identified by [i]peer_id[/i]. </description> </method> <method name="rpc_unreliable" qualifiers="vararg"> @@ -563,7 +568,7 @@ <argument index="0" name="method" type="String"> </argument> <description> - Send a [method rpc] using an unreliable protocol. + Sends a [method rpc] using an unreliable protocol. </description> </method> <method name="rpc_unreliable_id" qualifiers="vararg"> @@ -574,7 +579,7 @@ <argument index="1" name="method" type="String"> </argument> <description> - Send a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol. + Sends a [method rpc] to a specific peer identified by [i]peer_id[/i] using an unreliable protocol. </description> </method> <method name="rset"> @@ -585,7 +590,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Remotely change property's value on other peers (and locally). + Remotely changes property's value on other peers (and locally). </description> </method> <method name="rset_config"> @@ -596,7 +601,7 @@ <argument index="1" name="mode" type="int" enum="Node.RPCMode"> </argument> <description> - Change the property's RPC mode (one of RPC_MODE_* constants). + Changes the property's RPC mode (one of RPC_MODE_* constants). </description> </method> <method name="rset_id"> @@ -609,7 +614,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Remotely change property's value on a specific peer identified by [i]peer_id[/i]. + Remotely changes property's value on a specific peer identified by [i]peer_id[/i]. </description> </method> <method name="rset_unreliable"> @@ -620,7 +625,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Remotely change property's value on other peers (and locally) using an unreliable protocol. + Remotely changes property's value on other peers (and locally) using an unreliable protocol. </description> </method> <method name="rset_unreliable_id"> @@ -633,7 +638,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Remotely change property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol. + Remotely changes property's value on a specific peer identified by [i]peer_id[/i] using an unreliable protocol. </description> </method> <method name="set_filename"> @@ -651,7 +656,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Set the name of the [code]Node[/code]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. + Sets the name of the [code]Node[/code]. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. </description> </method> <method name="set_network_master"> @@ -662,6 +667,7 @@ <argument index="1" name="recursive" type="bool" default="true"> </argument> <description> + Sets the node network master to the peer with the given peer ID. The network master is the peer that has authority over it on the network. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). </description> </method> <method name="set_owner"> @@ -670,7 +676,7 @@ <argument index="0" name="owner" type="Node"> </argument> <description> - Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. + Sets the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. </description> </method> <method name="set_physics_process"> @@ -679,7 +685,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enables or disables the node's physics (alias fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _physics_process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_physics_process_delta_time]. + Enables or disables the node's physics (alias fixed framerate) processing. When a node is being processed, it will receive a NOTIFICATION_PHYSICS_PROCESS at a fixed (usually 60 fps, check [OS] to change that) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overriden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_physics_process_internal"> @@ -696,7 +702,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling [method get_process_delta_time]. + Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overriden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_input"> @@ -705,7 +711,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]). + Enables input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see [method _input]). Enabled automatically if [method _input] is overriden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_internal"> @@ -722,7 +728,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). (see [method _unhandled_input]). + Enables unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a [Control]). Enabled automatically if [method _unhandled_input] is overriden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_unhandled_key_input"> @@ -731,6 +737,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + Enables unhandled key input processing for node. Enabled automatically if [method _unhandled_key_input] is overriden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_scene_instance_load_placeholder"> @@ -769,16 +776,22 @@ </signals> <constants> <constant name="NOTIFICATION_ENTER_TREE" value="10"> + Notification received when the node enters a [SceneTree]. </constant> <constant name="NOTIFICATION_EXIT_TREE" value="11"> + Notification received when the node exits a [SceneTree]. </constant> <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12"> + Notification received when the node is moved in the parent. </constant> <constant name="NOTIFICATION_READY" value="13"> + Notification received when the node is ready. See [method _ready]. </constant> <constant name="NOTIFICATION_PAUSED" value="14"> + Notification received when the node is paused. </constant> <constant name="NOTIFICATION_UNPAUSED" value="15"> + Notification received when the node is unpaused. </constant> <constant name="NOTIFICATION_PHYSICS_PROCESS" value="16"> Notification received every frame when the physics process flag is set (see [method set_physics_process]). @@ -793,12 +806,16 @@ Notification received when a node is unparented (parent removed it from the list of children). </constant> <constant name="NOTIFICATION_INSTANCED" value="20"> + Notification received when the node is instanced. </constant> <constant name="NOTIFICATION_DRAG_BEGIN" value="21"> + Notification received when a drag begins. </constant> <constant name="NOTIFICATION_DRAG_END" value="22"> + Notification received when a drag ends. </constant> <constant name="NOTIFICATION_PATH_CHANGED" value="23"> + Notification received when the node's [NodePath] changed. </constant> <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="24"> </constant> @@ -830,12 +847,16 @@ Continue to process regardless of SceneTree pause state. </constant> <constant name="DUPLICATE_SIGNALS" value="1" enum="DuplicateFlags"> + Duplicate the node's signals. </constant> <constant name="DUPLICATE_GROUPS" value="2" enum="DuplicateFlags"> + Duplicate the node's groups. </constant> <constant name="DUPLICATE_SCRIPTS" value="4" enum="DuplicateFlags"> + Duplicate the node's scripts. </constant> <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags"> </constant> + Duplicate using instancing. </constants> </class> |