Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AudioStreamPlaybackInteractive
繼承: AudioStreamPlayback < RefCounted < Object
AudioStreamInteractive 的播放元件。
說明
AudioStreamInteractive 的播放元件,包含用於切換當前播放片段的函式。
方法
get_current_clip_index() const |
|
void |
switch_to_clip(clip_index: int) |
void |
switch_to_clip_by_name(clip_name: StringName) |
方法說明
int get_current_clip_index() const 🔗
返回目前正在播放的片段索引。可搭配 AudioStreamInteractive.get_clip_name() 取得當前片段名稱。
範例: 在 AudioStreamPlayer 節點中取得目前播放片段的名稱。
var playing_clip_name = stream.get_clip_name(get_stream_playback().get_current_clip_index())
void switch_to_clip(clip_index: int) 🔗
切換至指定索引的片段。
void switch_to_clip_by_name(clip_name: StringName) 🔗
切換至指定名稱的片段。