AnimatedSprite3D.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimatedSprite3D" inherits="SpriteBase3D" category="Core" version="3.2">
  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. </tutorials>
  11. <methods>
  12. <method name="is_playing" qualifiers="const">
  13. <return type="bool">
  14. </return>
  15. <description>
  16. Returns [code]true[/code] if an animation if currently being played.
  17. </description>
  18. </method>
  19. <method name="play">
  20. <return type="void">
  21. </return>
  22. <argument index="0" name="anim" type="String" default="&quot;&quot;">
  23. </argument>
  24. <description>
  25. Play the animation set in parameter. If no parameter is provided, the current animation is played.
  26. </description>
  27. </method>
  28. <method name="stop">
  29. <return type="void">
  30. </return>
  31. <description>
  32. Stop the current animation (does not reset the frame counter).
  33. </description>
  34. </method>
  35. </methods>
  36. <members>
  37. <member name="animation" type="String" setter="set_animation" getter="get_animation">
  38. The current animation from the [code]frames[/code] resource. If this value changes, the [code]frame[/code] counter is reset.
  39. </member>
  40. <member name="frame" type="int" setter="set_frame" getter="get_frame">
  41. The displayed animation frame's index.
  42. </member>
  43. <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames">
  44. The [SpriteFrames] resource containing the animation(s).
  45. </member>
  46. <member name="playing" type="bool" setter="_set_playing" getter="_is_playing">
  47. If [code]true[/code], the [member animation] is currently playing.
  48. </member>
  49. </members>
  50. <signals>
  51. <signal name="frame_changed">
  52. <description>
  53. Emitted when [member frame] changed.
  54. </description>
  55. </signal>
  56. </signals>
  57. <constants>
  58. </constants>
  59. </class>