AudioStreamPlaybackInteractive.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AudioStreamPlaybackInteractive" inherits="AudioStreamPlayback" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Playback component of [AudioStreamInteractive].
  5. </brief_description>
  6. <description>
  7. Playback component of [AudioStreamInteractive]. Contains functions to change the currently played clip.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_current_clip_index" qualifiers="const">
  13. <return type="int" />
  14. <description>
  15. Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with [method AudioStreamInteractive.get_clip_name].
  16. [b]Example:[/b] Get the currently playing clip name from inside an [AudioStreamPlayer] node.
  17. [codeblocks]
  18. [gdscript]
  19. var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index())
  20. [/gdscript]
  21. [/codeblocks]
  22. </description>
  23. </method>
  24. <method name="switch_to_clip">
  25. <return type="void" />
  26. <param index="0" name="clip_index" type="int" />
  27. <description>
  28. Switch to a clip (by index).
  29. </description>
  30. </method>
  31. <method name="switch_to_clip_by_name">
  32. <return type="void" />
  33. <param index="0" name="clip_name" type="StringName" />
  34. <description>
  35. Switch to a clip (by name).
  36. </description>
  37. </method>
  38. </methods>
  39. </class>