class_animatedsprite3d.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. Member Functions
  13. ----------------
  14. +--------------------------+------------------------------------------------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimatedSprite3D_is_playing>` **(** **)** const |
  16. +--------------------------+------------------------------------------------------------------------------------------+
  17. | void | :ref:`play<class_AnimatedSprite3D_play>` **(** :ref:`String<class_string>` anim="" **)** |
  18. +--------------------------+------------------------------------------------------------------------------------------+
  19. | void | :ref:`stop<class_AnimatedSprite3D_stop>` **(** **)** |
  20. +--------------------------+------------------------------------------------------------------------------------------+
  21. Signals
  22. -------
  23. .. _class_AnimatedSprite3D_frame_changed:
  24. - **frame_changed** **(** **)**
  25. Emitted when :ref:`frame<class_AnimatedSprite3D_frame>` changed.
  26. Member Variables
  27. ----------------
  28. .. _class_AnimatedSprite3D_animation:
  29. - :ref:`String<class_string>` **animation** - The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
  30. .. _class_AnimatedSprite3D_frame:
  31. - :ref:`int<class_int>` **frame** - The displayed animation frame's index.
  32. .. _class_AnimatedSprite3D_frames:
  33. - :ref:`SpriteFrames<class_spriteframes>` **frames** - The :ref:`SpriteFrames<class_spriteframes>` resource containing the animation(s).
  34. .. _class_AnimatedSprite3D_playing:
  35. - :ref:`bool<class_bool>` **playing** - If ``true`` the :ref:`animation<class_AnimatedSprite3D_animation>` is currently playing.
  36. Description
  37. -----------
  38. Animations are created using a :ref:`SpriteFrames<class_spriteframes>` resource, which can be configured in the editor via the SpriteFrames panel.
  39. Member Function Description
  40. ---------------------------
  41. .. _class_AnimatedSprite3D_is_playing:
  42. - :ref:`bool<class_bool>` **is_playing** **(** **)** const
  43. Return true if an animation if currently being played.
  44. .. _class_AnimatedSprite3D_play:
  45. - void **play** **(** :ref:`String<class_string>` anim="" **)**
  46. Play the animation set in parameter. If no parameter is provided, the current animation is played.
  47. .. _class_AnimatedSprite3D_stop:
  48. - void **stop** **(** **)**
  49. Stop the current animation (does not reset the frame counter).