AnimatedSprite3D.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimatedSprite3D" inherits="SpriteBase3D" version="3.4">
  3. <brief_description>
  4. 2D sprite node in 3D world, that can use multiple 2D textures for animation.
  5. </brief_description>
  6. <description>
  7. Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel.
  8. </description>
  9. <tutorials>
  10. <link title="2D Sprite animation (also applies to 3D)">https://docs.godotengine.org/en/3.3/tutorials/2d/2d_sprite_animation.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="is_playing" qualifiers="const">
  14. <return type="bool">
  15. </return>
  16. <description>
  17. Returns [code]true[/code] if an animation is currently being played.
  18. </description>
  19. </method>
  20. <method name="play">
  21. <return type="void">
  22. </return>
  23. <argument index="0" name="anim" type="String" default="&quot;&quot;">
  24. </argument>
  25. <description>
  26. Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
  27. </description>
  28. </method>
  29. <method name="stop">
  30. <return type="void">
  31. </return>
  32. <description>
  33. Stops the current animation (does not reset the frame counter).
  34. </description>
  35. </method>
  36. </methods>
  37. <members>
  38. <member name="animation" type="String" setter="set_animation" getter="get_animation" default="&quot;default&quot;">
  39. The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
  40. </member>
  41. <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0">
  42. The displayed animation frame's index.
  43. </member>
  44. <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
  45. The [SpriteFrames] resource containing the animation(s).
  46. </member>
  47. <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false">
  48. If [code]true[/code], the [member animation] is currently playing.
  49. </member>
  50. </members>
  51. <signals>
  52. <signal name="animation_finished">
  53. <description>
  54. Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
  55. </description>
  56. </signal>
  57. <signal name="frame_changed">
  58. <description>
  59. Emitted when [member frame] changed.
  60. </description>
  61. </signal>
  62. </signals>
  63. <constants>
  64. </constants>
  65. </class>