class_animatedsprite3d.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimatedSprite3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimatedSprite3D:
  6. AnimatedSprite3D
  7. ================
  8. **Inherits:** :ref:`SpriteBase3D<class_SpriteBase3D>` **<** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. 2D sprite node in 3D world, that can use multiple 2D textures for animation.
  13. Properties
  14. ----------
  15. +-----------------------------------------+-------------------------------------------------------------+
  16. | :ref:`String<class_String>` | :ref:`animation<class_AnimatedSprite3D_property_animation>` |
  17. +-----------------------------------------+-------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`frame<class_AnimatedSprite3D_property_frame>` |
  19. +-----------------------------------------+-------------------------------------------------------------+
  20. | :ref:`SpriteFrames<class_SpriteFrames>` | :ref:`frames<class_AnimatedSprite3D_property_frames>` |
  21. +-----------------------------------------+-------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`playing<class_AnimatedSprite3D_property_playing>` |
  23. +-----------------------------------------+-------------------------------------------------------------+
  24. Methods
  25. -------
  26. +-------------------------+-------------------------------------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimatedSprite3D_method_is_playing>` **(** **)** const |
  28. +-------------------------+-------------------------------------------------------------------------------------------------+
  29. | void | :ref:`play<class_AnimatedSprite3D_method_play>` **(** :ref:`String<class_String>` anim="" **)** |
  30. +-------------------------+-------------------------------------------------------------------------------------------------+
  31. | void | :ref:`stop<class_AnimatedSprite3D_method_stop>` **(** **)** |
  32. +-------------------------+-------------------------------------------------------------------------------------------------+
  33. Signals
  34. -------
  35. .. _class_AnimatedSprite3D_signal_frame_changed:
  36. - **frame_changed** **(** **)**
  37. Emitted when :ref:`frame<class_AnimatedSprite3D_property_frame>` changed.
  38. Description
  39. -----------
  40. Animations are created using a :ref:`SpriteFrames<class_SpriteFrames>` resource, which can be configured in the editor via the SpriteFrames panel.
  41. Property Descriptions
  42. ---------------------
  43. .. _class_AnimatedSprite3D_property_animation:
  44. - :ref:`String<class_String>` **animation**
  45. +----------+----------------------+
  46. | *Setter* | set_animation(value) |
  47. +----------+----------------------+
  48. | *Getter* | get_animation() |
  49. +----------+----------------------+
  50. The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
  51. ----
  52. .. _class_AnimatedSprite3D_property_frame:
  53. - :ref:`int<class_int>` **frame**
  54. +----------+------------------+
  55. | *Setter* | set_frame(value) |
  56. +----------+------------------+
  57. | *Getter* | get_frame() |
  58. +----------+------------------+
  59. The displayed animation frame's index.
  60. ----
  61. .. _class_AnimatedSprite3D_property_frames:
  62. - :ref:`SpriteFrames<class_SpriteFrames>` **frames**
  63. +----------+--------------------------+
  64. | *Setter* | set_sprite_frames(value) |
  65. +----------+--------------------------+
  66. | *Getter* | get_sprite_frames() |
  67. +----------+--------------------------+
  68. The :ref:`SpriteFrames<class_SpriteFrames>` resource containing the animation(s).
  69. ----
  70. .. _class_AnimatedSprite3D_property_playing:
  71. - :ref:`bool<class_bool>` **playing**
  72. If ``true``, the :ref:`animation<class_AnimatedSprite3D_property_animation>` is currently playing.
  73. Method Descriptions
  74. -------------------
  75. .. _class_AnimatedSprite3D_method_is_playing:
  76. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  77. Returns ``true`` if an animation if currently being played.
  78. ----
  79. .. _class_AnimatedSprite3D_method_play:
  80. - void **play** **(** :ref:`String<class_String>` anim="" **)**
  81. Play the animation set in parameter. If no parameter is provided, the current animation is played.
  82. ----
  83. .. _class_AnimatedSprite3D_method_stop:
  84. - void **stop** **(** **)**
  85. Stop the current animation (does not reset the frame counter).