mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +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`
108 lines
5.1 KiB
ReStructuredText
108 lines
5.1 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 Bone2D.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_Bone2D:
|
|
|
|
Bone2D
|
|
======
|
|
|
|
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Articulación usada con :ref:`Skeleton2D<class_Skeleton2D>` para controlar y animar otros nodos.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Usar una jerarquía de ``Bone2D`` unido a un :ref:`Skeleton2D<class_Skeleton2D>` para controlar, y animar otros nodos :ref:`Node2D<class_Node2D>`.
|
|
|
|
Puedes usar ``Bone2D`` y ``Skeleton2D`` nodos para animar mallas 2D creadas con el editor UV de Polygon 2D.
|
|
|
|
Cada hueso tiene una transformación :ref:`rest<class_Bone2D_property_rest>` a la que puedes volver con :ref:`apply_rest<class_Bone2D_method_apply_rest>`. Estas poses de reposo son relativas al padre del hueso.
|
|
|
|
Si en el editor puedes establecer la pose de reposo de un esqueleto entero usando una opción del menú, desde el código, necesitas iterar sobre los huesos para establecer sus poses de reposo individuales.
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
+---------------------------------------+-------------------------------------------------------------+-------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`default_length<class_Bone2D_property_default_length>` | ``16.0`` |
|
|
+---------------------------------------+-------------------------------------------------------------+-------------------------------------+
|
|
| :ref:`Transform2D<class_Transform2D>` | :ref:`rest<class_Bone2D_property_rest>` | ``Transform2D( 0, 0, 0, 0, 0, 0 )`` |
|
|
+---------------------------------------+-------------------------------------------------------------+-------------------------------------+
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
+---------------------------------------+---------------------------------------------------------------------------------------------+
|
|
| void | :ref:`apply_rest<class_Bone2D_method_apply_rest>` **(** **)** |
|
|
+---------------------------------------+---------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_index_in_skeleton<class_Bone2D_method_get_index_in_skeleton>` **(** **)** |const| |
|
|
+---------------------------------------+---------------------------------------------------------------------------------------------+
|
|
| :ref:`Transform2D<class_Transform2D>` | :ref:`get_skeleton_rest<class_Bone2D_method_get_skeleton_rest>` **(** **)** |const| |
|
|
+---------------------------------------+---------------------------------------------------------------------------------------------+
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_Bone2D_property_default_length:
|
|
|
|
- :ref:`float<class_float>` **default_length**
|
|
|
|
+-----------+---------------------------+
|
|
| *Default* | ``16.0`` |
|
|
+-----------+---------------------------+
|
|
| *Setter* | set_default_length(value) |
|
|
+-----------+---------------------------+
|
|
| *Getter* | get_default_length() |
|
|
+-----------+---------------------------+
|
|
|
|
La longitud de la representación del hueso dibujada en la vista del editor en píxeles.
|
|
|
|
----
|
|
|
|
.. _class_Bone2D_property_rest:
|
|
|
|
- :ref:`Transform2D<class_Transform2D>` **rest**
|
|
|
|
+-----------+-------------------------------------+
|
|
| *Default* | ``Transform2D( 0, 0, 0, 0, 0, 0 )`` |
|
|
+-----------+-------------------------------------+
|
|
| *Setter* | set_rest(value) |
|
|
+-----------+-------------------------------------+
|
|
| *Getter* | get_rest() |
|
|
+-----------+-------------------------------------+
|
|
|
|
La transformación en reposo del hueso. Puedes reajustar las transformaciones del nodo a este valor usando :ref:`apply_rest<class_Bone2D_method_apply_rest>`.
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_Bone2D_method_apply_rest:
|
|
|
|
- void **apply_rest** **(** **)**
|
|
|
|
Almacena las transformaciones del nodo actual en :ref:`rest<class_Bone2D_property_rest>`.
|
|
|
|
----
|
|
|
|
.. _class_Bone2D_method_get_index_in_skeleton:
|
|
|
|
- :ref:`int<class_int>` **get_index_in_skeleton** **(** **)** |const|
|
|
|
|
Devuelve el índice del nodo como parte de todo el esqueleto. Ver :ref:`Skeleton2D<class_Skeleton2D>`.
|
|
|
|
----
|
|
|
|
.. _class_Bone2D_method_get_skeleton_rest:
|
|
|
|
- :ref:`Transform2D<class_Transform2D>` **get_skeleton_rest** **(** **)** |const|
|
|
|
|
Devuelve el :ref:`rest<class_Bone2D_property_rest>` ``Transform2D`` del nodo si no tiene un padre, o su pose de reposo en relación con su padre.
|
|
|
|
.. |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.)`
|