mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-02 21:48:52 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
1418 lines
101 KiB
ReStructuredText
1418 lines
101 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the Node.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_Node:
|
|
|
|
Node
|
|
====
|
|
|
|
**Inherits:** :ref:`Object<class_Object>`
|
|
|
|
**Inherited By:** :ref:`AnimationPlayer<class_AnimationPlayer>`, :ref:`AnimationTree<class_AnimationTree>`, :ref:`AnimationTreePlayer<class_AnimationTreePlayer>`, :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, :ref:`CanvasItem<class_CanvasItem>`, :ref:`CanvasLayer<class_CanvasLayer>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorInterface<class_EditorInterface>`, :ref:`EditorPlugin<class_EditorPlugin>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`HTTPRequest<class_HTTPRequest>`, :ref:`InstancePlaceholder<class_InstancePlaceholder>`, :ref:`ResourcePreloader<class_ResourcePreloader>`, :ref:`SkeletonIK<class_SkeletonIK>`, :ref:`Spatial<class_Spatial>`, :ref:`Timer<class_Timer>`, :ref:`Tween<class_Tween>`, :ref:`Viewport<class_Viewport>`, :ref:`WorldEnvironment<class_WorldEnvironment>`
|
|
|
|
Clase base para todos los objetos *escena*.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Los nodos son los componentes básicos de Godot. Se pueden asignar como hijos de otro nodo, lo que da como resultado una disposición de árbol. Un nodo dado puede contener cualquier número de nodos como hijos con el requisito de que todos los hermanos (hijos directos de un nodo) deben tener nombres únicos.
|
|
|
|
Un árbol de nodos se llama *escena*. Las escenas se pueden guardar en el disco y luego instanciarlas en otras escenas. Esto permite una gran flexibilidad en la arquitectura y el modelo de datos de los proyectos de Godot.
|
|
|
|
\ **Árbol de escenas:** El :ref:`SceneTree<class_SceneTree>` contiene el árbol activo de nodos. Cuando se agrega un nodo al árbol de la escena, recibe la notificación :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` constante y se activa su devolución de llamada :ref:`_enter_tree<class_Node_method__enter_tree>`. Los nodos secundarios siempre se agregan *después de* su nodo principal, es decir, la devolución de llamada del :ref:`_enter_tree<class_Node_method__enter_tree>` de un nodo principal se activará antes que su nodo principal.
|
|
|
|
Una vez que se han agregado todos los nodos en el árbol de escenas, reciben la notificación :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` y se activan sus respectivas devoluciones de llamada de :ref:`_ready<class_Node_method__ready>`. Para grupos de nodos, la devolución de llamada :ref:`_ready<class_Node_method__ready>` se llama en orden inverso, comenzando con los nodos secundarios y subiendo a los nodos principales.
|
|
|
|
Esto significa que al agregar un nodo al árbol de la escena, se usará el siguiente orden para las devoluciones de llamada: :ref:`_enter_tree<class_Node_method__enter_tree>` del padre, :ref:`_enter_tree<class_Node_method__enter_tree>` de los hijos, :ref:`_ready<class_Node_method__ready>` de los hijos y finalmente :ref:`_ready<class_Node_method__ready>` del padre (recursivamente para todo el árbol de escenas).
|
|
|
|
\ **Procesamiento:** Los nodos pueden anular el estado de "proceso", para que reciban una devolución de llamada en cada marco solicitándoles que procesen (hagan algo). El procesamiento normal (devolución de llamada :ref:`_process<class_Node_method__process>`, conmutado con :ref:`set_process<class_Node_method_set_process>`) ocurre lo más rápido posible y depende de la velocidad de fotogramas, por lo que el tiempo de procesamiento *delta* se pasa como argumento. El procesamiento de física (devolución de llamada :ref:`_physics_process<class_Node_method__physics_process>`, alternado con :ref:`set_physics_process<class_Node_method_set_physics_process>`) ocurre un número fijo de veces por segundo (60 por defecto) y es útil para el código relacionado con el motor de física.
|
|
|
|
Los nodos también pueden procesar eventos de entrada. Cuando esté presente, se llamará a la función :ref:`_input<class_Node_method__input>` para cada entrada que reciba el programa. En muchos casos, esto puede ser excesivo (a menos que se use para proyectos simples), y la función :ref:`_unhandled_input<class_Node_method__unhandled_input>` podría ser preferible; se llama cuando el evento de entrada no fue manejado por nadie más (típicamente, nodos GUI :ref:`Control<class_Control>`), asegurando que el nodo solo reciba los eventos que estaban destinados a él.
|
|
|
|
Para realizar un seguimiento de la jerarquía de escenas (especialmente cuando se instalan escenas en otras escenas), se puede establecer un "propietario" para el nodo con la propiedad :ref:`owner<class_Node_property_owner>`. Esto realiza un seguimiento de quién instancia qué. Sin embargo, esto es sobre todo útil cuando se escriben editores y herramientas.
|
|
|
|
Finalmente, cuando un nodo se libera con :ref:`Object.free<class_Object_method_free>` o :ref:`queue_free<class_Node_method_queue_free>`, también liberará a todos sus hijos.
|
|
|
|
\ **Grupos:** Los nodos se pueden agregar a tantos grupos como quieras para que sea fácil de administrar, puedes crear grupos como "enemigos" o "coleccionables", por ejemplo, dependiendo de tu juego. Consulte :ref:`add_to_group<class_Node_method_add_to_group>`, :ref:`is_in_group<class_Node_method_is_in_group>` y :ref:`remove_from_group<class_Node_method_remove_from_group>`. A continuación, puede recuperar todos los nodos de estos grupos, iterarlos e incluso llamar a métodos en grupos a través de los métodos en :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
\ **Conexión en red con nodos:** Después de conectarse a un servidor (o crear uno, consulte :ref:`NetworkedMultiplayerENet<class_NetworkedMultiplayerENet>`), es posible utilizar el sistema integrado RPC (llamada a procedimiento remoto) para comunicarse a través de la red. Al llamar a :ref:`rpc<class_Node_method_rpc>` con un nombre de método, se llamará localmente y en todos los pares conectados (pares = clientes y el servidor que acepta conexiones). Para identificar qué nodo recibe la llamada RPC, Godot usará su :ref:`NodePath<class_NodePath>` (asegúrese de que los nombres de los nodos sean los mismos en todos los pares). Además, eche un vistazo al tutorial de redes de alto nivel y las demostraciones correspondientes.
|
|
|
|
Tutoriales
|
|
--------------------
|
|
|
|
- :doc:`Nodes and Scenes <../getting_started/step_by_step/nodes_and_scenes>`
|
|
|
|
- `All Demos <https://github.com/godotengine/godot-demo-projects/>`__
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`custom_multiplayer<class_Node_property_custom_multiplayer>` | |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`String<class_String>` | :ref:`filename<class_Node_property_filename>` | |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`multiplayer<class_Node_property_multiplayer>` | |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`String<class_String>` | :ref:`name<class_Node_property_name>` | |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`Node<class_Node>` | :ref:`owner<class_Node_property_owner>` | |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`PauseMode<enum_Node_PauseMode>` | :ref:`pause_mode<class_Node_property_pause_mode>` | ``0`` |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
| :ref:`int<class_int>` | :ref:`process_priority<class_Node_property_process_priority>` | ``0`` |
|
|
+---------------------------------------------+-------------------------------------------------------------------+-------+
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_enter_tree<class_Node_method__enter_tree>` **(** **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_exit_tree<class_Node_method__exit_tree>` **(** **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`_get_configuration_warning<class_Node_method__get_configuration_warning>` **(** **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_input<class_Node_method__input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_physics_process<class_Node_method__physics_process>` **(** :ref:`float<class_float>` delta **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_process<class_Node_method__process>` **(** :ref:`float<class_float>` delta **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_ready<class_Node_method__ready>` **(** **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_unhandled_input<class_Node_method__unhandled_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` **(** :ref:`InputEventKey<class_InputEventKey>` event **)** |virtual| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_child<class_Node_method_add_child>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` legible_unique_name=false **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_child_below_node<class_Node_method_add_child_below_node>` **(** :ref:`Node<class_Node>` node, :ref:`Node<class_Node>` child_node, :ref:`bool<class_bool>` legible_unique_name=false **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`add_to_group<class_Node_method_add_to_group>` **(** :ref:`String<class_String>` group, :ref:`bool<class_bool>` persistent=false **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`can_process<class_Node_method_can_process>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`duplicate<class_Node_method_duplicate>` **(** :ref:`int<class_int>` flags=15 **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`find_node<class_Node_method_find_node>` **(** :ref:`String<class_String>` mask, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`find_parent<class_Node_method_find_parent>` **(** :ref:`String<class_String>` mask **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`get_child<class_Node_method_get_child>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_child_count<class_Node_method_get_child_count>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>` | :ref:`get_children<class_Node_method_get_children>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>` | :ref:`get_groups<class_Node_method_get_groups>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_index<class_Node_method_get_index>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_network_master<class_Node_method_get_network_master>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`get_node<class_Node_method_get_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>` | :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`get_node_or_null<class_Node_method_get_node_or_null>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Node<class_Node>` | :ref:`get_parent<class_Node_method_get_parent>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`get_path<class_Node_method_get_path>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`get_path_to<class_Node_method_get_path_to>` **(** :ref:`Node<class_Node>` node **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_position_in_parent<class_Node_method_get_position_in_parent>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_process_delta_time<class_Node_method_get_process_delta_time>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`SceneTree<class_SceneTree>` | :ref:`get_tree<class_Node_method_get_tree>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Viewport<class_Viewport>` | :ref:`get_viewport<class_Node_method_get_viewport>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_node<class_Node_method_has_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_node_and_resource<class_Node_method_has_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_a_parent_of<class_Node_method_is_a_parent_of>` **(** :ref:`Node<class_Node>` node **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_greater_than<class_Node_method_is_greater_than>` **(** :ref:`Node<class_Node>` node **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_in_group<class_Node_method_is_in_group>` **(** :ref:`String<class_String>` group **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_inside_tree<class_Node_method_is_inside_tree>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_network_master<class_Node_method_is_network_master>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_physics_processing<class_Node_method_is_physics_processing>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_processing<class_Node_method_is_processing>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_processing_input<class_Node_method_is_processing_input>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_processing_internal<class_Node_method_is_processing_internal>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_input<class_Node_method_is_processing_unhandled_input>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_key_input<class_Node_method_is_processing_unhandled_key_input>` **(** **)** |const| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`move_child<class_Node_method_move_child>` **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_position **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`print_stray_nodes<class_Node_method_print_stray_nodes>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`print_tree<class_Node_method_print_tree>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`propagate_call<class_Node_method_propagate_call>` **(** :ref:`String<class_String>` method, :ref:`Array<class_Array>` args=[ ], :ref:`bool<class_bool>` parent_first=false **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`propagate_notification<class_Node_method_propagate_notification>` **(** :ref:`int<class_int>` what **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`queue_free<class_Node_method_queue_free>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`raise<class_Node_method_raise>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_and_skip<class_Node_method_remove_and_skip>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_child<class_Node_method_remove_child>` **(** :ref:`Node<class_Node>` node **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`remove_from_group<class_Node_method_remove_from_group>` **(** :ref:`String<class_String>` group **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`replace_by<class_Node_method_replace_by>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_data=false **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`request_ready<class_Node_method_request_ready>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`rpc<class_Node_method_rpc>` **(** :ref:`String<class_String>` method, ... **)** |vararg| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rpc_config<class_Node_method_rpc_config>` **(** :ref:`String<class_String>` method, :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` mode **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`rpc_id<class_Node_method_rpc_id>` **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` method, ... **)** |vararg| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`rpc_unreliable<class_Node_method_rpc_unreliable>` **(** :ref:`String<class_String>` method, ... **)** |vararg| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`rpc_unreliable_id<class_Node_method_rpc_unreliable_id>` **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` method, ... **)** |vararg| |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rset<class_Node_method_rset>` **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rset_config<class_Node_method_rset_config>` **(** :ref:`String<class_String>` property, :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` mode **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rset_id<class_Node_method_rset_id>` **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rset_unreliable<class_Node_method_rset_unreliable>` **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`rset_unreliable_id<class_Node_method_rset_unreliable_id>` **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_display_folded<class_Node_method_set_display_folded>` **(** :ref:`bool<class_bool>` fold **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_network_master<class_Node_method_set_network_master>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_physics_process<class_Node_method_set_physics_process>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_process<class_Node_method_set_process>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_process_input<class_Node_method_set_process_input>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_process_internal<class_Node_method_set_process_internal>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>` **(** :ref:`bool<class_bool>` load_placeholder **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`update_configuration_warning<class_Node_method_update_configuration_warning>` **(** **)** |
|
|
+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Señales
|
|
--------------
|
|
|
|
.. _class_Node_signal_ready:
|
|
|
|
- **ready** **(** **)**
|
|
|
|
Emitido cuando el nodo esté listo.
|
|
|
|
----
|
|
|
|
.. _class_Node_signal_renamed:
|
|
|
|
- **renamed** **(** **)**
|
|
|
|
Emitido cuando el nodo es renombrado.
|
|
|
|
----
|
|
|
|
.. _class_Node_signal_tree_entered:
|
|
|
|
- **tree_entered** **(** **)**
|
|
|
|
Emitido cuando el nodo entra en el árbol.
|
|
|
|
----
|
|
|
|
.. _class_Node_signal_tree_exited:
|
|
|
|
- **tree_exited** **(** **)**
|
|
|
|
Emitido después de que el nodo sale del árbol y ya no está activo.
|
|
|
|
----
|
|
|
|
.. _class_Node_signal_tree_exiting:
|
|
|
|
- **tree_exiting** **(** **)**
|
|
|
|
Emitido cuando el nodo está todavía activo pero a punto de salir del árbol. Este es el lugar adecuado para la des-inicialización (o un "destructor", si se quiere).
|
|
|
|
Enumeraciones
|
|
--------------------------
|
|
|
|
.. _enum_Node_PauseMode:
|
|
|
|
.. _class_Node_constant_PAUSE_MODE_INHERIT:
|
|
|
|
.. _class_Node_constant_PAUSE_MODE_STOP:
|
|
|
|
.. _class_Node_constant_PAUSE_MODE_PROCESS:
|
|
|
|
enum **PauseMode**:
|
|
|
|
- **PAUSE_MODE_INHERIT** = **0** --- Heredó el modo de pausa del padre del nodo. Para el nodo raíz, es equivalente a :ref:`PAUSE_MODE_STOP<class_Node_constant_PAUSE_MODE_STOP>`. Por defecto.
|
|
|
|
- **PAUSE_MODE_STOP** = **1** --- Detiene el procesamiento cuando el :ref:`SceneTree<class_SceneTree>` está en pausa.
|
|
|
|
- **PAUSE_MODE_PROCESS** = **2** --- Continúe el proceso sin importar el estado de pausa de :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
----
|
|
|
|
.. _enum_Node_DuplicateFlags:
|
|
|
|
.. _class_Node_constant_DUPLICATE_SIGNALS:
|
|
|
|
.. _class_Node_constant_DUPLICATE_GROUPS:
|
|
|
|
.. _class_Node_constant_DUPLICATE_SCRIPTS:
|
|
|
|
.. _class_Node_constant_DUPLICATE_USE_INSTANCING:
|
|
|
|
enum **DuplicateFlags**:
|
|
|
|
- **DUPLICATE_SIGNALS** = **1** --- Duplica las señales del nodo.
|
|
|
|
- **DUPLICATE_GROUPS** = **2** --- Duplica los grupos del nodo.
|
|
|
|
- **DUPLICATE_SCRIPTS** = **4** --- Duplica los scripts del nodo.
|
|
|
|
- **DUPLICATE_USE_INSTANCING** = **8** --- Duplicar usando instancias.
|
|
|
|
Una instancia permanece ligado al original, así que cuando el original cambia, la instancia también cambia.
|
|
|
|
Constantes
|
|
--------------------
|
|
|
|
.. _class_Node_constant_NOTIFICATION_ENTER_TREE:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_EXIT_TREE:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_READY:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_PAUSED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_UNPAUSED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_PROCESS:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_PARENTED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_UNPARENTED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_INSTANCED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_DRAG_BEGIN:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_DRAG_END:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_PATH_CHANGED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_INTERNAL_PROCESS:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_FOCUS_IN:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_FOCUS_OUT:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_QUIT_REQUEST:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_UNFOCUS_REQUEST:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_WM_ABOUT:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_CRASH:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_APP_RESUMED:
|
|
|
|
.. _class_Node_constant_NOTIFICATION_APP_PAUSED:
|
|
|
|
- **NOTIFICATION_ENTER_TREE** = **10** --- Notificación recibida cuando el nodo entra en un :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
- **NOTIFICATION_EXIT_TREE** = **11** --- Notificación recibida cuando el nodo está a punto de salir de un :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
- **NOTIFICATION_MOVED_IN_PARENT** = **12** --- Notificación recibida cuando el nodo se mueve en el padre.
|
|
|
|
- **NOTIFICATION_READY** = **13** --- Notificación recibida cuando el nodo esté listo. Véase :ref:`_ready<class_Node_method__ready>`.
|
|
|
|
- **NOTIFICATION_PAUSED** = **14** --- Notificación recibida cuando el nodo está en pausa.
|
|
|
|
- **NOTIFICATION_UNPAUSED** = **15** --- Notificación recibida cuando el nodo no está en pausa.
|
|
|
|
- **NOTIFICATION_PHYSICS_PROCESS** = **16** --- Notificación recibida en cada fotograma cuando se fija el indicador de proceso físico (ver :ref:`set_physics_process<class_Node_method_set_physics_process>`).
|
|
|
|
- **NOTIFICATION_PROCESS** = **17** --- Notificación recibida en cada fotograma cuando se fija el indicador de proceso (véase :ref:`set_process<class_Node_method_set_process>`).
|
|
|
|
- **NOTIFICATION_PARENTED** = **18** --- Notificación recibida cuando un nodo se establece como hijo de otro nodo.
|
|
|
|
\ **Nota:** Esto no significa que un nodo haya entrado en el :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
- **NOTIFICATION_UNPARENTED** = **19** --- Notificación recibida cuando un nodo no tiene padre (el padre o la madre lo ha eliminado de la lista de hijos).
|
|
|
|
- **NOTIFICATION_INSTANCED** = **20** --- Notificación recibida cuando el nodo es instanciado.
|
|
|
|
- **NOTIFICATION_DRAG_BEGIN** = **21** --- Notificación recibida cuando comienza un arrastre.
|
|
|
|
- **NOTIFICATION_DRAG_END** = **22** --- Notificación recibida cuando termina un arrastre.
|
|
|
|
- **NOTIFICATION_PATH_CHANGED** = **23** --- Notificación recibida cuando el :ref:`NodePath<class_NodePath>` del nodo cambió.
|
|
|
|
- **NOTIFICATION_INTERNAL_PROCESS** = **25** --- Notificación recibida en cada fotograma cuando se fija el indicador de proceso interno (véase :ref:`set_process_internal<class_Node_method_set_process_internal>`).
|
|
|
|
- **NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = **26** --- Notificación recibida en cada fotograma cuando se fija el flag de proceso de física interna (véase :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`).
|
|
|
|
- **NOTIFICATION_POST_ENTER_TREE** = **27** --- Notification received when the node is ready, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` is received. Unlike the latter, it's sent every time the node enters tree, instead of only once.
|
|
|
|
- **NOTIFICATION_WM_MOUSE_ENTER** = **1002** --- Notificación recibida del sistema operativo cuando el ratón entra en la ventana del juego.
|
|
|
|
Implementado en plataformas de escritorio y web.
|
|
|
|
- **NOTIFICATION_WM_MOUSE_EXIT** = **1003** --- Notificación recibida del sistema operativo cuando el ratón sale de la ventana del juego.
|
|
|
|
Implementado en plataformas de escritorio y web.
|
|
|
|
- **NOTIFICATION_WM_FOCUS_IN** = **1004** --- Notificación recibida del sistema operativo cuando la ventana del juego está enfocada.
|
|
|
|
Implementado en todas las plataformas.
|
|
|
|
- **NOTIFICATION_WM_FOCUS_OUT** = **1005** --- Notificación recibida del sistema operativo cuando la ventana del juego está desenfocada.
|
|
|
|
Implementado en todas las plataformas.
|
|
|
|
- **NOTIFICATION_WM_QUIT_REQUEST** = **1006** --- Notification received from the OS when a quit request is sent (e.g. closing the window with a "Close" button or Alt+F4).
|
|
|
|
Implemented on desktop platforms.
|
|
|
|
- **NOTIFICATION_WM_GO_BACK_REQUEST** = **1007** --- Notificación recibida del sistema operativo cuando se envía una solicitud de retroceso (por ejemplo, pulsando el botón "Back" en Android).
|
|
|
|
Específico de la plataforma Android.
|
|
|
|
- **NOTIFICATION_WM_UNFOCUS_REQUEST** = **1008** --- Notification received from the OS when an unfocus request is sent (e.g. another OS window wants to take the focus).
|
|
|
|
No supported platforms currently send this notification.
|
|
|
|
- **NOTIFICATION_OS_MEMORY_WARNING** = **1009** --- Notificación recibida del sistema operativo cuando la aplicación supera su memoria asignada.
|
|
|
|
Específico de la plataforma iOS.
|
|
|
|
- **NOTIFICATION_TRANSLATION_CHANGED** = **1010** --- Notificación recibida cuando las traducciones pueden haber cambiado. Puede ser activada por el usuario al cambiar el locale. Puede utilizarse para responder a los cambios de idioma, por ejemplo, para cambiar las strings de la interfaz de usuario sobre la marcha. Útil cuando se trabaja con el soporte de traducción incorporado, como :ref:`Object.tr<class_Object_method_tr>`.
|
|
|
|
- **NOTIFICATION_WM_ABOUT** = **1011** --- Notificación recibida del sistema operativo cuando se envía una solicitud de información "Acerca de".
|
|
|
|
Específico de la plataforma MacOS.
|
|
|
|
- **NOTIFICATION_CRASH** = **1012** --- Notificación recibida del controlador de fallos de Godot cuando el motor está a punto de fallar.
|
|
|
|
Implementado en las plataformas de escritorio si el manejador de fallos está habilitado.
|
|
|
|
- **NOTIFICATION_OS_IME_UPDATE** = **1013** --- Notificación recibida del sistema operativo cuando se produce una actualización del motor del método de entrada (por ejemplo, cambio de la posición del cursor de la IME o de la string de composición).
|
|
|
|
Específico de la plataforma MacOS.
|
|
|
|
- **NOTIFICATION_APP_RESUMED** = **1014** --- Notification received from the OS when the app is resumed.
|
|
|
|
Specific to the Android platform.
|
|
|
|
- **NOTIFICATION_APP_PAUSED** = **1015** --- Notification received from the OS when the app is paused.
|
|
|
|
Specific to the Android platform.
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_Node_property_custom_multiplayer:
|
|
|
|
- :ref:`MultiplayerAPI<class_MultiplayerAPI>` **custom_multiplayer**
|
|
|
|
+----------+-------------------------------+
|
|
| *Setter* | set_custom_multiplayer(value) |
|
|
+----------+-------------------------------+
|
|
| *Getter* | get_custom_multiplayer() |
|
|
+----------+-------------------------------+
|
|
|
|
La anulación del valor por defecto :ref:`MultiplayerAPI<class_MultiplayerAPI>`. La anulación a ``null`` para usar la predeterminada :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_property_filename:
|
|
|
|
- :ref:`String<class_String>` **filename**
|
|
|
|
+----------+---------------------+
|
|
| *Setter* | set_filename(value) |
|
|
+----------+---------------------+
|
|
| *Getter* | get_filename() |
|
|
+----------+---------------------+
|
|
|
|
If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in :ref:`filename<class_Node_property_filename>` (e.g. ``res://levels/1.tscn``). Otherwise, :ref:`filename<class_Node_property_filename>` is set to an empty string.
|
|
|
|
----
|
|
|
|
.. _class_Node_property_multiplayer:
|
|
|
|
- :ref:`MultiplayerAPI<class_MultiplayerAPI>` **multiplayer**
|
|
|
|
+----------+-------------------+
|
|
| *Getter* | get_multiplayer() |
|
|
+----------+-------------------+
|
|
|
|
La instancia :ref:`MultiplayerAPI<class_MultiplayerAPI>` asociada a este nodo. O bien el :ref:`custom_multiplayer<class_Node_property_custom_multiplayer>`, o el predeterminado SceneTree uno (si está dentro del árbol).
|
|
|
|
----
|
|
|
|
.. _class_Node_property_name:
|
|
|
|
- :ref:`String<class_String>` **name**
|
|
|
|
+----------+-----------------+
|
|
| *Setter* | set_name(value) |
|
|
+----------+-----------------+
|
|
| *Getter* | get_name() |
|
|
+----------+-----------------+
|
|
|
|
The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.
|
|
|
|
\ **Note:** Auto-generated names might include the ``@`` character, which is reserved for unique names when using :ref:`add_child<class_Node_method_add_child>`. When setting the name manually, any ``@`` will be removed.
|
|
|
|
----
|
|
|
|
.. _class_Node_property_owner:
|
|
|
|
- :ref:`Node<class_Node>` **owner**
|
|
|
|
+----------+------------------+
|
|
| *Setter* | set_owner(value) |
|
|
+----------+------------------+
|
|
| *Getter* | get_owner() |
|
|
+----------+------------------+
|
|
|
|
El dueño del nodo. Un nodo puede tener cualquier otro nodo como propietario (siempre que sea un padre, abuelo, etc. válido ascendente en el árbol). Cuando se guarda un nodo (usando :ref:`PackedScene<class_PackedScene>`), todos los nodos que posee se guardarán con él. Esto permite la creación de :ref:`SceneTree<class_SceneTree>` complejos, con instanciación y subinstanciación.
|
|
|
|
----
|
|
|
|
.. _class_Node_property_pause_mode:
|
|
|
|
- :ref:`PauseMode<enum_Node_PauseMode>` **pause_mode**
|
|
|
|
+-----------+-----------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+-----------------------+
|
|
| *Setter* | set_pause_mode(value) |
|
|
+-----------+-----------------------+
|
|
| *Getter* | get_pause_mode() |
|
|
+-----------+-----------------------+
|
|
|
|
Modo de pausa. Cómo se comportará el nodo si el :ref:`SceneTree<class_SceneTree>` está en pausa.
|
|
|
|
----
|
|
|
|
.. _class_Node_property_process_priority:
|
|
|
|
- :ref:`int<class_int>` **process_priority**
|
|
|
|
+-----------+-----------------------------+
|
|
| *Default* | ``0`` |
|
|
+-----------+-----------------------------+
|
|
| *Setter* | set_process_priority(value) |
|
|
+-----------+-----------------------------+
|
|
| *Getter* | get_process_priority() |
|
|
+-----------+-----------------------------+
|
|
|
|
La prioridad del nodo en el orden de ejecución de las llamadas de procesamiento habilitadas (es decir, :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` y sus contrapartes internas). Los nodos cuyo valor de prioridad de proceso sea *lower* tendrán sus devoluciones de procesamiento ejecutadas primero.
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_Node_method__enter_tree:
|
|
|
|
- void **_enter_tree** **(** **)** |virtual|
|
|
|
|
Llamado cuando el nodo entra en el :ref:`SceneTree<class_SceneTree>` (por ejemplo, al instalarse, al cambiar de escena o después de llamar a :ref:`add_child<class_Node_method_add_child>` en un script). Si el nodo tiene hijos, su llamada a :ref:`_enter_tree<class_Node_method__enter_tree>` se llamará primero, y luego la de los hijos.
|
|
|
|
Corresponde a la notificación :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` en :ref:`Object._notification<class_Object_method__notification>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method__exit_tree:
|
|
|
|
- void **_exit_tree** **(** **)** |virtual|
|
|
|
|
Llamado cuando el nodo está a punto de salir del :ref:`SceneTree<class_SceneTree>` (por ejemplo, al liberarse, al cambiar de escena o después de llamar a :ref:`remove_child<class_Node_method_remove_child>` en un script). Si el nodo tiene hijos, su llamada a :ref:`_exit_tree<class_Node_method__exit_tree>` se llamará al final, después de que todos sus hijos hayan dejado el árbol.
|
|
|
|
Corresponde a la notificación :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` en :ref:`Object._notification<class_Object_method__notification>` y a la señal :ref:`tree_exiting<class_Node_signal_tree_exiting>`. Para ser notificado cuando el nodo ya ha dejado el árbol activo, conéctese al :ref:`tree_exited<class_Node_signal_tree_exited>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method__get_configuration_warning:
|
|
|
|
- :ref:`String<class_String>` **_get_configuration_warning** **(** **)** |virtual|
|
|
|
|
La string devuelta por este método se muestra como una advertencia en el Scene Dock si el script que la tsobreescribe es un script ``tool``.
|
|
|
|
Devolver una string vacía no produce ninguna advertencia.
|
|
|
|
Llame a :ref:`update_configuration_warning<class_Node_method_update_configuration_warning>` cuando necesite actualizar el aviso para este nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method__input:
|
|
|
|
- void **_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
|
|
|
|
Called when there is an input event. The input event propagates up 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 overridden, and can be toggled with :ref:`set_process_input<class_Node_method_set_process_input>`.
|
|
|
|
To consume the input event and stop it propagating further to other nodes, :ref:`SceneTree.set_input_as_handled<class_SceneTree_method_set_input_as_handled>` can be called.
|
|
|
|
For gameplay input, :ref:`_unhandled_input<class_Node_method__unhandled_input>` and :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` are usually a better fit as they allow the GUI to intercept the events first.
|
|
|
|
\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
|
|
|
|
----
|
|
|
|
.. _class_Node_method__physics_process:
|
|
|
|
- void **_physics_process** **(** :ref:`float<class_float>` delta **)** |virtual|
|
|
|
|
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 ``delta`` variable should be constant. ``delta`` is in seconds.
|
|
|
|
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process<class_Node_method_set_physics_process>`.
|
|
|
|
Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` notification in :ref:`Object._notification<class_Object_method__notification>`.
|
|
|
|
\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
|
|
|
|
----
|
|
|
|
.. _class_Node_method__process:
|
|
|
|
- void **_process** **(** :ref:`float<class_float>` delta **)** |virtual|
|
|
|
|
Llamado durante la etapa de procesamiento del bucle principal. El procesamiento se realiza en cada fotograma y lo más rápido posible, por lo que el tiempo ``delta`` desde el fotograma anterior no es constante.
|
|
|
|
Sólo se llama si el procesamiento está habilitado, lo que se hace automáticamente si este método es anulado, y puede ser conmutado con :ref:`set_process<class_Node_method_set_process>`.
|
|
|
|
Corresponde a la notificación :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` en :ref:`Object._notification<class_Object_method__notification>`.
|
|
|
|
\ **Nota:** Este método sólo se llama si el nodo está presente en el árbol de la escena (es decir, si no es huérfano).
|
|
|
|
----
|
|
|
|
.. _class_Node_method__ready:
|
|
|
|
- void **_ready** **(** **)** |virtual|
|
|
|
|
Se llama cuando el nodo está "listo", es decir, cuando tanto el nodo como sus hijos han entrado en el árbol de la escena. Si el nodo tiene hijos, sus llamadas :ref:`_ready<class_Node_method__ready>` se activan primero, y el nodo padre recibirá la notificación de listo después.
|
|
|
|
Corresponde a la notificación :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` en :ref:`Object._notification<class_Object_method__notification>`. Véase también la palabra clave ``onready`` para las variables.
|
|
|
|
Normalmente se utiliza para la inicialización. Para una inicialización aún más temprana, se puede utilizar :ref:`Object._init<class_Object_method__init>`. Véase también :ref:`_enter_tree<class_Node_method__enter_tree>`.
|
|
|
|
\ **Nota:** :ref:`_ready<class_Node_method__ready>` puede ser llamado sólo una vez para cada nodo. Después de eliminar un nodo del árbol de la escena y volver a añadirlo, ``_ready`` no se llamará por segunda vez. Esto puede ser obviado con la petición de otra llamada con :ref:`request_ready<class_Node_method_request_ready>`, que puede ser llamada en cualquier lugar antes de añadir el nodo de nuevo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method__unhandled_input:
|
|
|
|
- void **_unhandled_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
|
|
|
|
Called when an :ref:`InputEvent<class_InputEvent>` hasn't been consumed by :ref:`_input<class_Node_method__input>` or any GUI. The input event propagates up through the node tree until a node consumes it.
|
|
|
|
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`.
|
|
|
|
To consume the input event and stop it propagating further to other nodes, :ref:`SceneTree.set_input_as_handled<class_SceneTree_method_set_input_as_handled>` can be called.
|
|
|
|
For gameplay input, this and :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` are usually a better fit than :ref:`_input<class_Node_method__input>` as they allow the GUI to intercept the events first.
|
|
|
|
\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
|
|
|
|
----
|
|
|
|
.. _class_Node_method__unhandled_key_input:
|
|
|
|
- void **_unhandled_key_input** **(** :ref:`InputEventKey<class_InputEventKey>` event **)** |virtual|
|
|
|
|
Called when an :ref:`InputEventKey<class_InputEventKey>` hasn't been consumed by :ref:`_input<class_Node_method__input>` or any GUI. The input event propagates up through the node tree until a node consumes it.
|
|
|
|
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`.
|
|
|
|
To consume the input event and stop it propagating further to other nodes, :ref:`SceneTree.set_input_as_handled<class_SceneTree_method_set_input_as_handled>` can be called.
|
|
|
|
For gameplay input, this and :ref:`_unhandled_input<class_Node_method__unhandled_input>` are usually a better fit than :ref:`_input<class_Node_method__input>` as they allow the GUI to intercept the events first.
|
|
|
|
\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_add_child:
|
|
|
|
- void **add_child** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` legible_unique_name=false **)**
|
|
|
|
Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.
|
|
|
|
If ``legible_unique_name`` is ``true``, the child node will have a human-readable name based on the name of the node being instanced instead of its type.
|
|
|
|
\ **Note:** If the child node already has a parent, the function will fail. Use :ref:`remove_child<class_Node_method_remove_child>` first to remove the node from its current parent. For example:
|
|
|
|
::
|
|
|
|
if child_node.get_parent():
|
|
child_node.get_parent().remove_child(child_node)
|
|
add_child(child_node)
|
|
|
|
\ **Note:** If you want a child to be persisted to a :ref:`PackedScene<class_PackedScene>`, you must set :ref:`owner<class_Node_property_owner>` in addition to calling :ref:`add_child<class_Node_method_add_child>`. This is typically relevant for `tool scripts <https://godot.readthedocs.io/en/3.2/tutorials/misc/running_code_in_the_editor.html>`__ and `editor plugins <https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html>`__. If :ref:`add_child<class_Node_method_add_child>` is called without setting :ref:`owner<class_Node_property_owner>`, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_add_child_below_node:
|
|
|
|
- void **add_child_below_node** **(** :ref:`Node<class_Node>` node, :ref:`Node<class_Node>` child_node, :ref:`bool<class_bool>` legible_unique_name=false **)**
|
|
|
|
Adds ``child_node`` as a child. The child is placed below the given ``node`` in the list of children.
|
|
|
|
If ``legible_unique_name`` is ``true``, the child node will have a human-readable name based on the name of the node being instanced instead of its type.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_add_to_group:
|
|
|
|
- void **add_to_group** **(** :ref:`String<class_String>` group, :ref:`bool<class_bool>` persistent=false **)**
|
|
|
|
Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
The ``persistent`` option is used when packing node to :ref:`PackedScene<class_PackedScene>` and saving to file. Non-persistent groups aren't stored.
|
|
|
|
\ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_can_process:
|
|
|
|
- :ref:`bool<class_bool>` **can_process** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo puede procesar mientras el árbol de la escena está en pausa (ver :ref:`pause_mode<class_Node_property_pause_mode>`). Siempre devuelve ``true`` si el árbol de la escena no está pausado, y ``false`` si el nodo no está en el árbol.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_duplicate:
|
|
|
|
- :ref:`Node<class_Node>` **duplicate** **(** :ref:`int<class_int>` flags=15 **)** |const|
|
|
|
|
Duplica el nodo, devolviendo un nuevo nodo.
|
|
|
|
Puedes afinar el comportamiento usando las ``flags`` (ver :ref:`DuplicateFlags<enum_Node_DuplicateFlags>`).
|
|
|
|
\ **Nota:** No funcionará correctamente si el nodo contiene un script con argumentos de constructor (es decir, necesita suministrar argumentos al método :ref:`Object._init<class_Object_method__init>`). En ese caso, el nodo se duplicará sin un script.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_find_node:
|
|
|
|
- :ref:`Node<class_Node>` **find_node** **(** :ref:`String<class_String>` mask, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const|
|
|
|
|
Finds a descendant of this node whose name matches ``mask`` as in :ref:`String.match<class_String_method_match>` (i.e. case-sensitive, but ``"*"`` matches zero or more characters and ``"?"`` matches any single character except ``"."``). Returns ``null`` if no matching ``Node`` is found.
|
|
|
|
\ **Note:** It does not match against the full path, just against individual node names.
|
|
|
|
If ``owned`` is ``true``, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.
|
|
|
|
\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` instead. To avoid using :ref:`find_node<class_Node_method_find_node>` too often, consider caching the node reference into a variable.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_find_parent:
|
|
|
|
- :ref:`Node<class_Node>` **find_parent** **(** :ref:`String<class_String>` mask **)** |const|
|
|
|
|
Finds the first parent of the current node whose name matches ``mask`` as in :ref:`String.match<class_String_method_match>` (i.e. case-sensitive, but ``"*"`` matches zero or more characters and ``"?"`` matches any single character except ``"."``).
|
|
|
|
\ **Note:** It does not match against the full path, just against individual node names.
|
|
|
|
\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` instead. To avoid using :ref:`find_parent<class_Node_method_find_parent>` too often, consider caching the node reference into a variable.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_child:
|
|
|
|
- :ref:`Node<class_Node>` **get_child** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Devuelve un nodo hijo por su índice (ver :ref:`get_child_count<class_Node_method_get_child_count>`). Este método se usa a menudo para iterar todos los hijos de un nodo.
|
|
|
|
Para acceder a un nodo hijo a través de su nombre, usa :ref:`get_node<class_Node_method_get_node>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_child_count:
|
|
|
|
- :ref:`int<class_int>` **get_child_count** **(** **)** |const|
|
|
|
|
Devuelve el número de nodos infantiles.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_children:
|
|
|
|
- :ref:`Array<class_Array>` **get_children** **(** **)** |const|
|
|
|
|
Devuelve un array de referencias a los hijos del nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_groups:
|
|
|
|
- :ref:`Array<class_Array>` **get_groups** **(** **)** |const|
|
|
|
|
Returns an array listing the groups that the node is a member of.
|
|
|
|
\ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
|
|
|
|
\ **Note:** 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 :ref:`get_groups<class_Node_method_get_groups>`, use the following snippet:
|
|
|
|
::
|
|
|
|
# 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)
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_index:
|
|
|
|
- :ref:`int<class_int>` **get_index** **(** **)** |const|
|
|
|
|
Returns the node's index, i.e. its position among the siblings of its parent.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_network_master:
|
|
|
|
- :ref:`int<class_int>` **get_network_master** **(** **)** |const|
|
|
|
|
Devuelve el ID del par del maestro de la red para este nodo. Ver :ref:`set_network_master<class_Node_method_set_network_master>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_node:
|
|
|
|
- :ref:`Node<class_Node>` **get_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
|
|
|
|
Fetches a node. The :ref:`NodePath<class_NodePath>` can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, ``null`` is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call <method> on a null instance." error.
|
|
|
|
\ **Note:** Fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
|
|
|
|
\ **Example:** Assume your current node is Character and the following tree:
|
|
|
|
::
|
|
|
|
/root
|
|
/root/Character
|
|
/root/Character/Sword
|
|
/root/Character/Backpack/Dagger
|
|
/root/MyGame
|
|
/root/Swamp/Alligator
|
|
/root/Swamp/Mosquito
|
|
/root/Swamp/Goblin
|
|
|
|
Possible paths are:
|
|
|
|
::
|
|
|
|
get_node("Sword")
|
|
get_node("Backpack/Dagger")
|
|
get_node("../Swamp/Alligator")
|
|
get_node("/root/MyGame")
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_node_and_resource:
|
|
|
|
- :ref:`Array<class_Array>` **get_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)**
|
|
|
|
Busca un nodo y uno de sus recursos como se especifica en el subnombre de :ref:`NodePath<class_NodePath>` (por ejemplo, ``Area2D/CollisionShape2D:shape``). Si se especifican varios recursos anidados en el :ref:`NodePath<class_NodePath>`, el último será recuperado.
|
|
|
|
El valor de retorno es un array de tamaño 3: el primer índice apunta al ``Node`` (o al ``null`` si no se encuentra), el segundo índice apunta al :ref:`Resource<class_Resource>` (o al ``null`` si no se encuentra), y el tercero es el :ref:`NodePath<class_NodePath>` restante, si lo hay.
|
|
|
|
Por ejemplo, suponiendo que ``Area2D/CollisionShape2D`` es un nodo válido y que a su propiedad ``shape`` se le ha asignado un recurso :ref:`RectangleShape2D<class_RectangleShape2D>`, se podría tener este tipo de salida:
|
|
|
|
::
|
|
|
|
print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ]
|
|
print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ]
|
|
print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_node_or_null:
|
|
|
|
- :ref:`Node<class_Node>` **get_node_or_null** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
|
|
|
|
Similar a :ref:`get_node<class_Node_method_get_node>`, pero no registra un error si ``path`` no apunta a un ``Node`` válido.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_parent:
|
|
|
|
- :ref:`Node<class_Node>` **get_parent** **(** **)** |const|
|
|
|
|
Returns the parent node of the current node, or ``null`` if the node lacks a parent.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_path:
|
|
|
|
- :ref:`NodePath<class_NodePath>` **get_path** **(** **)** |const|
|
|
|
|
Devuelve la ruta absoluta del nodo actual. Esto sólo funciona si el nodo actual está dentro del árbol de la escena (ver :ref:`is_inside_tree<class_Node_method_is_inside_tree>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_path_to:
|
|
|
|
- :ref:`NodePath<class_NodePath>` **get_path_to** **(** :ref:`Node<class_Node>` node **)** |const|
|
|
|
|
Devuelve la ruta relativa :ref:`NodePath<class_NodePath>` de este nodo al ``node`` especificado. Ambos nodos deben estar en la misma escena o la función fallará.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_physics_process_delta_time:
|
|
|
|
- :ref:`float<class_float>` **get_physics_process_delta_time** **(** **)** |const|
|
|
|
|
Returns the time elapsed (in seconds) since the last physics-bound frame (see :ref:`_physics_process<class_Node_method__physics_process>`). This is always a constant value in physics processing unless the frames per second is changed via :ref:`Engine.iterations_per_second<class_Engine_property_iterations_per_second>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_position_in_parent:
|
|
|
|
- :ref:`int<class_int>` **get_position_in_parent** **(** **)** |const|
|
|
|
|
Devuelve el orden del nodo en la rama del árbol de la escena. Por ejemplo, si se llama al primer nodo hijo la posición es ``0``.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_process_delta_time:
|
|
|
|
- :ref:`float<class_float>` **get_process_delta_time** **(** **)** |const|
|
|
|
|
Devuelve el tiempo transcurrido (en segundos) desde la última llamada del proceso. Este valor puede variar de un fotograma a otro.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_scene_instance_load_placeholder:
|
|
|
|
- :ref:`bool<class_bool>` **get_scene_instance_load_placeholder** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si se trata de un marcador de posición de carga de instancia. Ver :ref:`InstancePlaceholder<class_InstancePlaceholder>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_tree:
|
|
|
|
- :ref:`SceneTree<class_SceneTree>` **get_tree** **(** **)** |const|
|
|
|
|
Devuelve el :ref:`SceneTree<class_SceneTree>` que contiene este nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_get_viewport:
|
|
|
|
- :ref:`Viewport<class_Viewport>` **get_viewport** **(** **)** |const|
|
|
|
|
Devuelve el :ref:`Viewport<class_Viewport>` del nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_has_node:
|
|
|
|
- :ref:`bool<class_bool>` **has_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo al que apunta :ref:`NodePath<class_NodePath>` existe.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_has_node_and_resource:
|
|
|
|
- :ref:`bool<class_bool>` **has_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)** |const|
|
|
|
|
Devuelve ``true`` si el :ref:`NodePath<class_NodePath>` apunta a un nodo válido y su subnombre apunta a un recurso válido, por ejemplo, ``Area2D/CollisionShape2D:shape``. Las propiedades que no son de tipo :ref:`Resource<class_Resource>` (por ejemplo, nodos o tipos matemáticos primitivos) no se consideran recursos.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_a_parent_of:
|
|
|
|
- :ref:`bool<class_bool>` **is_a_parent_of** **(** :ref:`Node<class_Node>` node **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo dado es un hijo directo o indirecto del nodo actual.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_displayed_folded:
|
|
|
|
- :ref:`bool<class_bool>` **is_displayed_folded** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo está plegado (colapsado) en el muelle de la escena.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_greater_than:
|
|
|
|
- :ref:`bool<class_bool>` **is_greater_than** **(** :ref:`Node<class_Node>` node **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo dado se produce más tarde en la jerarquía de la escena que el nodo actual.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_in_group:
|
|
|
|
- :ref:`bool<class_bool>` **is_in_group** **(** :ref:`String<class_String>` group **)** |const|
|
|
|
|
Devuelve ``true`` si este nodo está en el grupo especificado. Vea las notas en la descripción, y los métodos de grupo en :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_inside_tree:
|
|
|
|
- :ref:`bool<class_bool>` **is_inside_tree** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si este nodo está actualmente dentro de un :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_network_master:
|
|
|
|
- :ref:`bool<class_bool>` **is_network_master** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el sistema local es el maestro de este nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_physics_processing:
|
|
|
|
- :ref:`bool<class_bool>` **is_physics_processing** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el procesamiento de la física está activado (véase :ref:`set_physics_process<class_Node_method_set_physics_process>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_physics_processing_internal:
|
|
|
|
- :ref:`bool<class_bool>` **is_physics_processing_internal** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el procesamiento de la física interna está activado (véase :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_processing:
|
|
|
|
- :ref:`bool<class_bool>` **is_processing** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el procesamiento está activado (véase :ref:`set_process<class_Node_method_set_process>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_processing_input:
|
|
|
|
- :ref:`bool<class_bool>` **is_processing_input** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo está procesando la entrada (ver :ref:`set_process_input<class_Node_method_set_process_input>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_processing_internal:
|
|
|
|
- :ref:`bool<class_bool>` **is_processing_internal** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el procesamiento interno está activado (véase :ref:`set_process_internal<class_Node_method_set_process_internal>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_processing_unhandled_input:
|
|
|
|
- :ref:`bool<class_bool>` **is_processing_unhandled_input** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo está procesando una entrada no manejada (ver :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_is_processing_unhandled_key_input:
|
|
|
|
- :ref:`bool<class_bool>` **is_processing_unhandled_key_input** **(** **)** |const|
|
|
|
|
Devuelve ``true`` si el nodo está procesando una entrada de clave no manejada (ver :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_move_child:
|
|
|
|
- void **move_child** **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_position **)**
|
|
|
|
Mueve un nodo hijo a una posición diferente (orden) entre los otros hijos. Dado que las llamadas, señales, etc. se realizan por orden de árbol, cambiar el orden de los nodos hijos puede ser útil.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_print_stray_nodes:
|
|
|
|
- void **print_stray_nodes** **(** **)**
|
|
|
|
Imprime todos los nodos perdidos (nodos fuera del :ref:`SceneTree<class_SceneTree>`). Se utiliza para la depuración. Funciona sólo en construcciones de depuración.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_print_tree:
|
|
|
|
- void **print_tree** **(** **)**
|
|
|
|
Imprime el árbol a stdout. Se utiliza principalmente para fines de depuración. Esta versión muestra la ruta relativa al nodo actual, y es buena para copiar/pegar en la función :ref:`get_node<class_Node_method_get_node>`.
|
|
|
|
\ **Ejemplo de salida:**\
|
|
|
|
::
|
|
|
|
ElJuego
|
|
ElJuego/Menu
|
|
ElJuego/Menu/Label
|
|
ElJuego/Menu/Camera2D
|
|
ElJuego/PantallaInicial
|
|
ElJuego/PantallaInicial/Camera2D
|
|
|
|
----
|
|
|
|
.. _class_Node_method_print_tree_pretty:
|
|
|
|
- void **print_tree_pretty** **(** **)**
|
|
|
|
Similar to :ref:`print_tree<class_Node_method_print_tree>`, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees.
|
|
|
|
\ **Example output:**\
|
|
|
|
::
|
|
|
|
┖╴TheGame
|
|
┠╴Menu
|
|
┃ ┠╴Label
|
|
┃ ┖╴Camera2D
|
|
┖╴SplashScreen
|
|
┖╴Camera2D
|
|
|
|
----
|
|
|
|
.. _class_Node_method_propagate_call:
|
|
|
|
- void **propagate_call** **(** :ref:`String<class_String>` method, :ref:`Array<class_Array>` args=[ ], :ref:`bool<class_bool>` parent_first=false **)**
|
|
|
|
Llama al método dado (si está presente) con los argumentos dados en ``args`` en este nodo y recursivamente en todos sus hijos. Si el argumento ``parent_first`` es ``true``, el método será llamado primero al nodo actual, y luego a todos sus hijos. Si ``parent_first`` es ``false``, los hijos serán llamados primero.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_propagate_notification:
|
|
|
|
- void **propagate_notification** **(** :ref:`int<class_int>` what **)**
|
|
|
|
Notifica al nodo actual y a todos sus hijos de forma recursiva llamando al :ref:`Object.notification<class_Object_method_notification>` en todos ellos.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_queue_free:
|
|
|
|
- void **queue_free** **(** **)**
|
|
|
|
Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to :ref:`Object.free<class_Object_method_free>`. Use :ref:`Object.is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` to check whether a node will be deleted at the end of the frame.
|
|
|
|
\ **Important:** If you have a variable pointing to a node, it will *not* be assigned to ``null`` once the node is freed. Instead, it will point to a *previously freed instance* and you should validate it with :ref:`@GDScript.is_instance_valid<class_@GDScript_method_is_instance_valid>` before attempting to call its methods or access its properties.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_raise:
|
|
|
|
- void **raise** **(** **)**
|
|
|
|
Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs (:ref:`Control<class_Control>` nodes), because their order of drawing depends on their order in the tree. The top Node is drawn first, then any siblings below the top Node in the hierarchy are successively drawn on top of it. After using ``raise``, a Control will be drawn on top of its siblings.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_remove_and_skip:
|
|
|
|
- void **remove_and_skip** **(** **)**
|
|
|
|
Quita un nodo y pone a todos sus hijos como hijos del nodo padre (si existe). Todas las suscripciones de eventos que pasen por el nodo eliminado serán canceladas.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_remove_child:
|
|
|
|
- void **remove_child** **(** :ref:`Node<class_Node>` node **)**
|
|
|
|
Removes a child node. The node is NOT deleted and must be deleted manually.
|
|
|
|
\ **Note:** This function may set the :ref:`owner<class_Node_property_owner>` of the removed Node (or its descendants) to be ``null``, if that :ref:`owner<class_Node_property_owner>` is no longer a parent or ancestor.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_remove_from_group:
|
|
|
|
- void **remove_from_group** **(** :ref:`String<class_String>` group **)**
|
|
|
|
Elimina un nodo de un grupo. Vea las notas en la descripción, y los métodos de grupo en :ref:`SceneTree<class_SceneTree>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_replace_by:
|
|
|
|
- void **replace_by** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_data=false **)**
|
|
|
|
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
|
|
|
|
\ **Note:** The given node will become the new parent of any child nodes that the replaced node had.
|
|
|
|
\ **Note:** The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using :ref:`Object.free<class_Object_method_free>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_request_ready:
|
|
|
|
- void **request_ready** **(** **)**
|
|
|
|
Solicita que se llame de nuevo a ``_ready``. Tenga en cuenta que el método no se llamará inmediatamente, sino que está programado para cuando el nodo se añada de nuevo al árbol de la escena (véase :ref:`_ready<class_Node_method__ready>`). ``_ready`` se llama sólo para el nodo que lo ha solicitado, lo que significa que necesita solicitar ready para cada niño si quiere que también llamen a ``_ready`` (en cuyo caso, se llamará a ``_ready`` en el mismo orden que normalmente).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rpc:
|
|
|
|
- :ref:`Variant<class_Variant>` **rpc** **(** :ref:`String<class_String>` method, ... **)** |vararg|
|
|
|
|
Envía una solicitud de llamada de procedimiento a distancia para el ``method`` dado a los pares en la red (y localmente), opcionalmente enviando todos los argumentos adicionales como argumentos al método llamado por la RPC. La solicitud de llamada sólo será recibida por nodos con el mismo :ref:`NodePath<class_NodePath>`, incluyendo exactamente el mismo nombre de nodo. El comportamiento depende de la configuración de la RPC para el método dado, véase :ref:`rpc_config<class_Node_method_rpc_config>`. Los métodos no están expuestos a las RPC por defecto. Véase también :ref:`rset<class_Node_method_rset>` y :ref:`rset_config<class_Node_method_rset_config>` para las propiedades. Devuelve una :ref:`Variant<class_Variant>` vacía.
|
|
|
|
\ **Nota:** Sólo se pueden utilizar RPCs de forma segura en clientes después de haber recibido la señal ``connected_to_server`` de la :ref:`SceneTree<class_SceneTree>`. También es necesario hacer un seguimiento del estado de la conexión, ya sea por las señales de :ref:`SceneTree<class_SceneTree>` como ``server_disconnected`` o comprobando ``SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED``.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rpc_config:
|
|
|
|
- void **rpc_config** **(** :ref:`String<class_String>` method, :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` mode **)**
|
|
|
|
Cambia el modo RPC para el ``method`` dado al ``mode`` dado. Ver :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`. Una alternativa es anotar los métodos y propiedades con las palabras clave correspondientes (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). Por defecto, los métodos no están expuestos a las redes (y a los RPC). Ver también :ref:`rset<class_Node_method_rset>` y :ref:`rset_config<class_Node_method_rset_config>` para las propiedades.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rpc_id:
|
|
|
|
- :ref:`Variant<class_Variant>` **rpc_id** **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` method, ... **)** |vararg|
|
|
|
|
Envía un :ref:`rpc<class_Node_method_rpc>` a un par específico identificado por ``peer_id`` (véase :ref:`NetworkedMultiplayerPeer.set_target_peer<class_NetworkedMultiplayerPeer_method_set_target_peer>`). Devuelve una :ref:`Variant<class_Variant>` vacía.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rpc_unreliable:
|
|
|
|
- :ref:`Variant<class_Variant>` **rpc_unreliable** **(** :ref:`String<class_String>` method, ... **)** |vararg|
|
|
|
|
Envía un :ref:`rpc<class_Node_method_rpc>` usando un protocolo poco fiable. Devuelve una :ref:`Variant<class_Variant>` vacía.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rpc_unreliable_id:
|
|
|
|
- :ref:`Variant<class_Variant>` **rpc_unreliable_id** **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` method, ... **)** |vararg|
|
|
|
|
Envía un :ref:`rpc<class_Node_method_rpc>` a un par específico identificado por ``peer_id`` utilizando un protocolo poco fiable (véase :ref:`NetworkedMultiplayerPeer.set_target_peer<class_NetworkedMultiplayerPeer_method_set_target_peer>`). Devuelve una :ref:`Variant<class_Variant>` vacía.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rset:
|
|
|
|
- void **rset** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Cambia remotamente el valor de una propiedad en otros pares (y localmente). El comportamiento depende de la configuración RPC de la propiedad dada, ver :ref:`rset_config<class_Node_method_rset_config>`. Véase también :ref:`rpc<class_Node_method_rpc>` para los métodos RPC, la mayoría de la información se aplica también a este método.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rset_config:
|
|
|
|
- void **rset_config** **(** :ref:`String<class_String>` property, :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` mode **)**
|
|
|
|
Cambia el modo RPC para la ``property`` dada al ``mode`` dado. Ver :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`. Una alternativa es anotar los métodos y propiedades con las palabras clave correspondientes (``remote``, ``master``, ``puppet``, ``remotesync``, ``mastersync``, ``puppetsync``). Por defecto, las propiedades no están expuestas a las redes (y a los RPCs). Ver también :ref:`rpc<class_Node_method_rpc>` y :ref:`rpc_config<class_Node_method_rpc_config>` para los métodos.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rset_id:
|
|
|
|
- void **rset_id** **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Cambia remotamente el valor de la propiedad en un par específico identificado por ``peer_id`` (véase el :ref:`NetworkedMultiplayerPeer.set_target_peer<class_NetworkedMultiplayerPeer_method_set_target_peer>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rset_unreliable:
|
|
|
|
- void **rset_unreliable** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Cambia remotamente el valor de la propiedad en otros pares (y localmente) usando un protocolo poco fiable.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_rset_unreliable_id:
|
|
|
|
- void **rset_unreliable_id** **(** :ref:`int<class_int>` peer_id, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Cambia remotamente el valor de la propiedad en un par específico identificado por ``peer_id`` utilizando un protocolo poco fiable (véase el :ref:`NetworkedMultiplayerPeer.set_target_peer<class_NetworkedMultiplayerPeer_method_set_target_peer>`).
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_display_folded:
|
|
|
|
- void **set_display_folded** **(** :ref:`bool<class_bool>` fold **)**
|
|
|
|
Establece el estado de plegado del nodo en el muelle de la escena.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_network_master:
|
|
|
|
- void **set_network_master** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)**
|
|
|
|
Establece el maestro de la red del nodo al par con el ID del par dado. El maestro de la red es el par que tiene autoridad sobre el nodo de la red. Útil en conjunción con las palabras clave ``master`` y ``puppet``. Heredado del nodo padre por defecto, que en última instancia es el ID del par 1 (el servidor). Si ``recursive``, el par dado se establece recursivamente como el maestro para todos los hijos de este nodo.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_physics_process:
|
|
|
|
- void **set_physics_process** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Activa o desactiva el procesamiento físico (es decir, la velocidad de fotogramas fijos). Cuando un nodo está siendo procesado, recibirá una :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` a un intervalo fijo (normalmente 60 FPS, ver :ref:`Engine.iterations_per_second<class_Engine_property_iterations_per_second>` para cambiar) (y se llamará a la devolución de llamada de :ref:`_physics_process<class_Node_method__physics_process>` si existe). Se habilita automáticamente si se anula :ref:`_physics_process<class_Node_method__physics_process>`. Cualquier llamada a esto antes de :ref:`_ready<class_Node_method__ready>` será ignorada.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_physics_process_internal:
|
|
|
|
- void **set_physics_process_internal** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process<class_Node_method__physics_process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process<class_Node_method_set_physics_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior.
|
|
|
|
\ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_process:
|
|
|
|
- void **set_process** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Habilita o deshabilita el procesamiento. Cuando un nodo está siendo procesado, recibirá una :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` en cada fotograma dibujado (y se llamará a la devolución de llamada :ref:`_process<class_Node_method__process>` si existe). Se habilita automáticamente si se anula :ref:`_process<class_Node_method__process>`. Cualquier llamada a esto antes de :ref:`_ready<class_Node_method__ready>` será ignorada.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_process_input:
|
|
|
|
- void **set_process_input** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Habilita o deshabilita el procesamiento de la entrada. ¡Esto no es necesario para los controles GUI! Se activa automáticamente si se anula :ref:`_input<class_Node_method__input>`. Cualquier llamada a esto antes de :ref:`_ready<class_Node_method__ready>` será ignorada.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_process_internal:
|
|
|
|
- void **set_process_internal** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process<class_Node_method__process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process<class_Node_method_set_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior.
|
|
|
|
\ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_process_unhandled_input:
|
|
|
|
- void **set_process_unhandled_input** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Permite el procesamiento de entradas sin manejar. ¡Esto no es necesario para los controles GUI! Permite que el nodo reciba todas las entradas que no hayan sido manejadas previamente (normalmente por un :ref:`Control<class_Control>`). Se habilita automáticamente si se anula :ref:`_unhandled_input<class_Node_method__unhandled_input>`. Cualquier llamada a esto antes de :ref:`_ready<class_Node_method__ready>` será ignorada.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_process_unhandled_key_input:
|
|
|
|
- void **set_process_unhandled_key_input** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Permite el procesamiento de entradas de claves sin manejar. Se activa automáticamente si se anula :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>`. Cualquier llamada a esto antes de :ref:`_ready<class_Node_method__ready>` será ignorada.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_set_scene_instance_load_placeholder:
|
|
|
|
- void **set_scene_instance_load_placeholder** **(** :ref:`bool<class_bool>` load_placeholder **)**
|
|
|
|
Establece si se trata de un marcador de posición de carga de instancia. Ver :ref:`InstancePlaceholder<class_InstancePlaceholder>`.
|
|
|
|
----
|
|
|
|
.. _class_Node_method_update_configuration_warning:
|
|
|
|
- void **update_configuration_warning** **(** **)**
|
|
|
|
Actualiza la advertencia que se muestra para este nodo en el Scene Dock.
|
|
|
|
Utiliza :ref:`_get_configuration_warning<class_Node_method__get_configuration_warning>` para configurar el mensaje de advertencia a mostrar.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|