virtualx-engine-docs/_sources/classes/class_skeleton2d.rst.txt
2024-10-23 09:41:33 -07:00

110 lines
3.8 KiB
ReStructuredText

:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Skeleton2D.xml.
.. _class_Skeleton2D:
Skeleton2D
==========
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Skeleton for 2D characters and animated objects.
.. rst-class:: classref-introduction-group
Description
-----------
Skeleton2D parents a hierarchy of :ref:`Bone2D<class_Bone2D>` objects. It is a requirement of :ref:`Bone2D<class_Bone2D>`. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`../tutorials/animation/2d_skeletons`
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-----------------------------+-----------------------------------------------------------------------------------------+
| :ref:`Bone2D<class_Bone2D>` | :ref:`get_bone<class_Skeleton2D_method_get_bone>` **(** :ref:`int<class_int>` idx **)** |
+-----------------------------+-----------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton2D_method_get_bone_count>` **(** **)** |const| |
+-----------------------------+-----------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`get_skeleton<class_Skeleton2D_method_get_skeleton>` **(** **)** |const| |
+-----------------------------+-----------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signals
-------
.. _class_Skeleton2D_signal_bone_setup_changed:
.. rst-class:: classref-signal
**bone_setup_changed** **(** **)**
.. container:: contribute
There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_Skeleton2D_method_get_bone:
.. rst-class:: classref-method
:ref:`Bone2D<class_Bone2D>` **get_bone** **(** :ref:`int<class_int>` idx **)**
Returns a :ref:`Bone2D<class_Bone2D>` from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter ``idx``. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling.
.. rst-class:: classref-item-separator
----
.. _class_Skeleton2D_method_get_bone_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_bone_count** **(** **)** |const|
Returns the number of :ref:`Bone2D<class_Bone2D>` nodes in the node hierarchy parented by Skeleton2D.
.. rst-class:: classref-item-separator
----
.. _class_Skeleton2D_method_get_skeleton:
.. rst-class:: classref-method
:ref:`RID<class_RID>` **get_skeleton** **(** **)** |const|
Returns the :ref:`RID<class_RID>` of a Skeleton2D instance.
.. |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.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`