class_animatedsprite3d.rst 4.6 KB

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