class_skeleton2d.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Skeleton2D.xml.
  6. .. _class_Skeleton2D:
  7. Skeleton2D
  8. ==========
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Skeleton for 2D characters and animated objects.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`../tutorials/animation/2d_skeletons`
  19. .. rst-class:: classref-reftable-group
  20. Methods
  21. -------
  22. .. table::
  23. :widths: auto
  24. +-----------------------------+-----------------------------------------------------------------------------------------+
  25. | :ref:`Bone2D<class_Bone2D>` | :ref:`get_bone<class_Skeleton2D_method_get_bone>` **(** :ref:`int<class_int>` idx **)** |
  26. +-----------------------------+-----------------------------------------------------------------------------------------+
  27. | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton2D_method_get_bone_count>` **(** **)** |const| |
  28. +-----------------------------+-----------------------------------------------------------------------------------------+
  29. | :ref:`RID<class_RID>` | :ref:`get_skeleton<class_Skeleton2D_method_get_skeleton>` **(** **)** |const| |
  30. +-----------------------------+-----------------------------------------------------------------------------------------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Signals
  35. -------
  36. .. _class_Skeleton2D_signal_bone_setup_changed:
  37. .. rst-class:: classref-signal
  38. **bone_setup_changed** **(** **)**
  39. .. container:: contribute
  40. There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Method Descriptions
  45. -------------------
  46. .. _class_Skeleton2D_method_get_bone:
  47. .. rst-class:: classref-method
  48. :ref:`Bone2D<class_Bone2D>` **get_bone** **(** :ref:`int<class_int>` idx **)**
  49. 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.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_Skeleton2D_method_get_bone_count:
  53. .. rst-class:: classref-method
  54. :ref:`int<class_int>` **get_bone_count** **(** **)** |const|
  55. Returns the number of :ref:`Bone2D<class_Bone2D>` nodes in the node hierarchy parented by Skeleton2D.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_Skeleton2D_method_get_skeleton:
  59. .. rst-class:: classref-method
  60. :ref:`RID<class_RID>` **get_skeleton** **(** **)** |const|
  61. Returns the :ref:`RID<class_RID>` of a Skeleton2D instance.
  62. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  63. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  64. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  65. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`