class_animatedsprite3d.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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>` | "default" |
  17. +-----------------------------------------+-------------------------------------------------------------+-----------+
  18. | :ref:`int<class_int>` | :ref:`frame<class_AnimatedSprite3D_property_frame>` | 0 |
  19. +-----------------------------------------+-------------------------------------------------------------+-----------+
  20. | :ref:`SpriteFrames<class_SpriteFrames>` | :ref:`frames<class_AnimatedSprite3D_property_frames>` | |
  21. +-----------------------------------------+-------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`playing<class_AnimatedSprite3D_property_playing>` | false |
  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. | *Default* | "default" |
  47. +-----------+----------------------+
  48. | *Setter* | set_animation(value) |
  49. +-----------+----------------------+
  50. | *Getter* | get_animation() |
  51. +-----------+----------------------+
  52. The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
  53. .. _class_AnimatedSprite3D_property_frame:
  54. - :ref:`int<class_int>` **frame**
  55. +-----------+------------------+
  56. | *Default* | 0 |
  57. +-----------+------------------+
  58. | *Setter* | set_frame(value) |
  59. +-----------+------------------+
  60. | *Getter* | get_frame() |
  61. +-----------+------------------+
  62. The displayed animation frame's index.
  63. .. _class_AnimatedSprite3D_property_frames:
  64. - :ref:`SpriteFrames<class_SpriteFrames>` **frames**
  65. +----------+--------------------------+
  66. | *Setter* | set_sprite_frames(value) |
  67. +----------+--------------------------+
  68. | *Getter* | get_sprite_frames() |
  69. +----------+--------------------------+
  70. The :ref:`SpriteFrames<class_SpriteFrames>` resource containing the animation(s).
  71. .. _class_AnimatedSprite3D_property_playing:
  72. - :ref:`bool<class_bool>` **playing**
  73. +-----------+-------+
  74. | *Default* | false |
  75. +-----------+-------+
  76. If ``true``, the :ref:`animation<class_AnimatedSprite3D_property_animation>` is currently playing.
  77. Method Descriptions
  78. -------------------
  79. .. _class_AnimatedSprite3D_method_is_playing:
  80. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  81. Returns ``true`` if an animation is currently being played.
  82. .. _class_AnimatedSprite3D_method_play:
  83. - void **play** **(** :ref:`String<class_String>` anim="" **)**
  84. Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played.
  85. .. _class_AnimatedSprite3D_method_stop:
  86. - void **stop** **(** **)**
  87. Stops the current animation (does not reset the frame counter).