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...
AudioListener2D¶
继承: Node2D < CanvasItem < Node < Object
覆盖听到声音的位置。
描述¶
一旦被添加到场景树并使用 make_current 启用,此节点将覆盖听到声音的位置。只有一个 AudioListener2D 可以是当前的。使用 make_current 将禁用之前的 AudioListener2D。
如果当前 Viewport 中没有活动的 AudioListener2D,则屏幕中心将用作音频的聆听点。AudioListener2D 需要在 SceneTree 内才能起作用。
方法¶
void |
clear_current ( ) |
is_current ( ) const |
|
void |
make_current ( ) |
方法说明¶
void clear_current ( )
禁用 AudioListener2D。如果未设置为当前,则此方法无效。
bool is_current ( ) const
如果该 AudioListener2D 当前处于激活状态,则返回 true
。
void make_current ( )
激活该 AudioListener2D,将其设置为声音的聆听点。如果已经有另一个激活的 AudioListener2D,它将被禁用。
如果 AudioListener2D 未添加到 SceneTree,则该方法无效。