AnimatedSprite3D.xml 2.0 KB

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