mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
Sync class reference translations with upstream 4.x
Still only zh_CN for now. zh_TW is near 100% complete, but it has hundreds of validation errors which need to be fixed first.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
GDScript 专用的实用函数及注解列表,可在任何脚本中访问。
|
||||
|
||||
@@ -23,15 +23,15 @@ GDScript 专用的实用函数及注解列表,可在任何脚本中访问。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`GDScript的导出 <../tutorials/scripting/gdscript/gdscript_exports>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -74,8 +74,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constants
|
||||
---------
|
||||
常量
|
||||
----
|
||||
|
||||
.. _class_@GDScript_constant_PI:
|
||||
|
||||
@@ -126,14 +126,41 @@ Annotations
|
||||
|
||||
**@export** **(** **)**
|
||||
|
||||
将以下属性标记为导出的(可在检查器窗口中进行编辑并保存到磁盘)。使用类型提示控制导出属性的类型。
|
||||
将后续的属性标记为导出属性(可以在检查器面板中编辑并保存至磁盘)。要控制导出属性的类型,请使用类型提示标记。
|
||||
|
||||
::
|
||||
|
||||
extends Node
|
||||
|
||||
enum Direction {LEFT, RIGHT, UP, DOWN}
|
||||
|
||||
# 内置类型。
|
||||
@export var string = ""
|
||||
@export var int_number = 5
|
||||
@export var float_number: float = 5
|
||||
@export var image : Image
|
||||
|
||||
# 枚举。
|
||||
@export var type: Variant.Type
|
||||
@export var format: Image.Format
|
||||
@export var direction: Direction
|
||||
|
||||
# 资源。
|
||||
@export var image: Image
|
||||
@export var custom_resource: CustomResource
|
||||
|
||||
# 节点。
|
||||
@export var node: Node
|
||||
@export var custom_node: CustomNode
|
||||
|
||||
# 类型数组。
|
||||
@export var int_array: Array[int]
|
||||
@export var direction_array: Array[Direction]
|
||||
@export var image_array: Array[Image]
|
||||
@export var node_array: Array[Node]
|
||||
|
||||
\ **注意:**\ 自定义资源和自定义节点必须使用 ``class_name`` 注册为全局类。
|
||||
|
||||
\ **注意:**\ 节点的导出只有派生自 :ref:`Node<class_Node>` 的类才支持,并且还有一些其他限制。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -145,17 +172,17 @@ Annotations
|
||||
|
||||
**@export_category** **(** :ref:`String<class_String>` name **)**
|
||||
|
||||
为以下导出的属性定义一个新类别。这有助于在检查器面板中组织属性。
|
||||
为后续导出属性定义一个新类别。方便在检查器面板中组织属性。
|
||||
|
||||
另请参见 :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY<class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY>`\ 。
|
||||
另见 :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY<class_@GlobalScope_constant_PROPERTY_USAGE_CATEGORY>`\ 。
|
||||
|
||||
::
|
||||
|
||||
@export_category("My Properties")
|
||||
@export var number = 3
|
||||
@export var string = ""
|
||||
@export_category("Statistics")
|
||||
@export var hp = 30
|
||||
@export var speed = 1.25
|
||||
|
||||
\ **注意:**\ 检查器面板中的列表通常会按类别将来自不同类(如Node、Node2D、Sprite等)的属性分隔开来。详情请参阅 :ref:`@export_group<class_@GDScript_annotation_@export_group>` 和 :ref:`@export_subgroup<class_@GDScript_annotation_@export_subgroup>`\ 。
|
||||
\ **注意:**\ 检查器面板中的列表通常会按类别将来自不同类(如 Node、Node2D、Sprite 等)的属性分隔开来。为了更明确,推荐改用 :ref:`@export_group<class_@GDScript_annotation_@export_group>` 和 :ref:`@export_subgroup<class_@GDScript_annotation_@export_subgroup>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -185,9 +212,9 @@ Annotations
|
||||
|
||||
**@export_dir** **(** **)**
|
||||
|
||||
将 :ref:`String<class_String>` 属性作为目录路径导出。该路径仅限于项目文件夹及其子文件夹。请参阅 :ref:`@export_global_dir<class_@GDScript_annotation_@export_global_dir>`\ ,以允许从整个文件系统中进行选择。
|
||||
将 :ref:`String<class_String>` 属性作为目录路径导出。该路径仅限于项目文件夹及其子文件夹。要允许在整个文件系统中进行选择,见 :ref:`@export_global_dir<class_@GDScript_annotation_@export_global_dir>`\ 。
|
||||
|
||||
另请参见 :ref:`@GlobalScope.PROPERTY_HINT_DIR<class_@GlobalScope_constant_PROPERTY_HINT_DIR>`\ 。
|
||||
另见 :ref:`@GlobalScope.PROPERTY_HINT_DIR<class_@GlobalScope_constant_PROPERTY_HINT_DIR>`\ 。
|
||||
|
||||
::
|
||||
|
||||
@@ -460,11 +487,11 @@ Annotations
|
||||
|
||||
**@export_global_file** **(** :ref:`String<class_String>` filter="", ... **)** |vararg|
|
||||
|
||||
将 :ref:`String<class_String>` 属性作为文件路径导出。该路径可以从整个文件系统中选择。请参阅 :ref:`@export_file<class_@GDScript_annotation_@export_file>`\ ,以将其限制为项目文件夹及其子文件夹。
|
||||
将 :ref:`String<class_String>` 属性作为文件路径导出。该路径可以在整个文件系统中进行选择。要将其限制为项目文件夹及其子文件夹,见 :ref:`@export_file<class_@GDScript_annotation_@export_file>`\ 。
|
||||
|
||||
如果提供了 ``filter``\ ,则只有匹配的文件可供选择。
|
||||
|
||||
另请参见 :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE<class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE>`\ 。
|
||||
另见 :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE<class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_FILE>`\ 。
|
||||
|
||||
::
|
||||
|
||||
@@ -530,15 +557,15 @@ Annotations
|
||||
|
||||
**@export_node_path** **(** :ref:`String<class_String>` type="", ... **)** |vararg|
|
||||
|
||||
Export a :ref:`NodePath<class_NodePath>` property with a filter for allowed node types.
|
||||
导出具有过滤器,并允许节点类型为 :ref:`NodePath<class_NodePath>` 的属性。
|
||||
|
||||
See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES>`.
|
||||
参见 :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES>`\ 。
|
||||
|
||||
::
|
||||
|
||||
@export_node_path("Button", "TouchScreenButton") var some_button
|
||||
|
||||
\ **Note:** The type must be a native class or a globally registered script (using the ``class_name`` keyword) that inherits :ref:`Node<class_Node>`.
|
||||
\ **注意:** 类型必须是本地类或全局注册的脚本(使用\ ``[class_name]``\ 关键字)且继承自 :ref:`Node<class_Node>` 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -568,11 +595,11 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalSco
|
||||
|
||||
**@export_range** **(** :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`float<class_float>` step=1.0, :ref:`String<class_String>` extra_hints="", ... **)** |vararg|
|
||||
|
||||
将一个\ :ref:`int<class_int>`\ 或\ :ref:`float<class_float>`\ 属性导出为一个范围值。范围必须由 ``min`` 和 ``max`` 定义,以及一个可选的 ``step`` 和各种额外的提示。对于整数属性,\ ``step`` 的默认值是 ``1`` 。对于浮点数,这个值取决于你的 ``EditorSettings.interface/inspector/default_float_step`` 设置。
|
||||
将 :ref:`int<class_int>` 或 :ref:`float<class_float>` 属性导出为范围值。范围必须由 ``min`` 和 ``max`` 定义,还有一个可选的 ``step`` 和各种额外的提示。对于整数属性,\ ``step`` 的默认值是 ``1`` 。对于浮点数,这个值取决于你的 ``EditorSettings.interface/inspector/default_float_step`` 设置。
|
||||
|
||||
如果提供了提示 ``"or_greater"`` 和 ``"or_less"`` ,那么编辑器部件将不会在范围边界处对数值进行限制。\ ``"exp"`` 提示将使范围内的编辑值以指数形式变化。\ ``"hide_slider"`` 提示将隐藏编辑器部件中的滑块。
|
||||
|
||||
提示还允许指示编辑的值的单位。使用 ``"radians"`` ,你可以指定实际值以弧度为单位,但在检查器中会以角度为单位显示。\ ``"degrees"`` 允许添加一个角度符号作为单位后缀。最后,可以使用 ``"suffix:单位"`` 提供一个自定义后缀,其中“单位”可以是任何字符串。
|
||||
提示还允许指示编辑的值的单位。使用 ``"radians_as_degrees"`` ,你可以指定实际值以弧度为单位,但在检查器中会以角度为单位显示(范围值也使用度数)。\ ``"degrees"`` 允许添加一个角度符号作为单位后缀。最后,可以使用 ``"suffix:单位"`` 提供一个自定义后缀,其中“单位”可以是任何字符串。
|
||||
|
||||
另见 :ref:`@GlobalScope.PROPERTY_HINT_RANGE<class_@GlobalScope_constant_PROPERTY_HINT_RANGE>`\ 。
|
||||
|
||||
@@ -585,9 +612,9 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalSco
|
||||
@export_range(0, 100, 1, "or_greater") var power_percent
|
||||
@export_range(0, 100, 1, "or_greater", "or_less") var health_delta
|
||||
|
||||
@export_range(-3.14, 3.14, 0.001, "radians") var angle_radians
|
||||
@export_range(-3.14, 3.14, 0.001, "radians_as_degrees") var angle_radians
|
||||
@export_range(0, 360, 1, "degrees") var angle_degrees
|
||||
@export_range(-8, 8, 2, "suffix:像素") var target_offset
|
||||
@export_range(-8, 8, 2, "suffix:px") var target_offset
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -625,17 +652,17 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES<class_@GlobalSco
|
||||
|
||||
**@icon** **(** :ref:`String<class_String>` icon_path **)**
|
||||
|
||||
Add a custom icon to the current script. The icon specified at ``icon_path`` is displayed in the Scene dock for every node of that class, as well as in various editor dialogs.
|
||||
为当前脚本添加自定义图标。\ ``icon_path`` 所指定的图标会在“场景”面板中该类的所有节点上显示,也会显示在各种编辑器对话框中。
|
||||
|
||||
::
|
||||
|
||||
@icon("res://path/to/class/icon.svg")
|
||||
|
||||
\ **Note:** Only the script can have a custom icon. Inner classes are not supported.
|
||||
\ **注意:**\ 只有脚本可以有自定义的图标。不支持内部类。
|
||||
|
||||
\ **Note:** As annotations describe their subject, the ``@icon`` annotation must be placed before the class definition and inheritance.
|
||||
\ **注意:**\ 由于注解描述的是它们的对象,\ :ref:`@icon<class_@GDScript_annotation_@icon>` 注解必须放在类定义和继承之前。
|
||||
|
||||
\ **Note:** Unlike other annotations, the argument of the ``@icon`` annotation must be a string literal (constant expressions are not supported).
|
||||
\ **注意:**\ 不同于其他注解,\ :ref:`@icon<class_@GDScript_annotation_@icon>` 注解的参数必须是字符串字面量(不支持常量表达式)。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -647,7 +674,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is
|
||||
|
||||
**@onready** **(** **)**
|
||||
|
||||
标记后续属性会在 :ref:`Node<class_Node>` 的就绪状态时赋值。节点初始化(\ :ref:`Object._init<class_Object_method__init>`\ )时不会立即对这些属性赋值,而是会在即将调用 :ref:`Node._ready<class_Node_method__ready>` 之前进行计算和保存。
|
||||
标记后续属性会在 :ref:`Node<class_Node>` 的就绪状态时赋值。节点初始化(\ :ref:`Object._init<class_Object_private_method__init>`\ )时不会立即对这些属性赋值,而是会在即将调用 :ref:`Node._ready<class_Node_private_method__ready>` 之前进行计算和保存。
|
||||
|
||||
::
|
||||
|
||||
@@ -663,17 +690,17 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is
|
||||
|
||||
**@rpc** **(** :ref:`String<class_String>` mode="authority", :ref:`String<class_String>` sync="call_remote", :ref:`String<class_String>` transfer_mode="unreliable", :ref:`int<class_int>` transfer_channel=0 **)**
|
||||
|
||||
Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`.
|
||||
将后续方法标记为远程过程调用。见\ :doc:`《高阶多人游戏》 <../tutorials/networking/high_level_multiplayer>`\ 。
|
||||
|
||||
If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config<class_Node_method_rpc_config>`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY<class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY>` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER<class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER>` RPC modes. See :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there.
|
||||
如果将 ``mode`` 设为 ``"any_peer"``\ ,则会允许所有对等体调用该 RPC 函数。否则就只允许该对等体的控制方调用,此时应该让 ``mode`` 保持为 ``"authority"``\ 。使用 :ref:`Node.rpc_config<class_Node_method_rpc_config>` 将函数配置为 RPC 时,这些模式对应的是 RPC 模式 :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY<class_MultiplayerAPI_constant_RPC_MODE_AUTHORITY>` 和 :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER<class_MultiplayerAPI_constant_RPC_MODE_ANY_PEER>`\ 。如果非控制方的对等体尝试调用仅限控制方调用的函数,则不会执行该函数。如果本地能够检测到错误(本地与远程对等体的 RPC 配置一致),则发送方对等体会显示错误消息。否则远程对等体会检测到该错误并输出错误。
|
||||
|
||||
If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config<class_Node_method_rpc_config>`, this is equivalent to setting ``call_local`` to ``true``.
|
||||
如果将 ``sync`` 设为 ``"call_remote"``\ ,则该函数只会在远程对等体上执行,不会在本地执行。要让这个函数在本地也执行,请将 ``sync`` 设置为 ``"call_local"``\ 。使用 :ref:`Node.rpc_config<class_Node_method_rpc_config>` 将函数配置为 RPC 时,等价于将 ``call_local`` 设置为 ``true``\ 。
|
||||
|
||||
The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer<class_MultiplayerPeer>`. See :ref:`MultiplayerPeer.transfer_mode<class_MultiplayerPeer_property_transfer_mode>`.
|
||||
\ ``transfer_mode`` 能够接受的值为 ``"unreliable"``\ 、\ ``"unreliable_ordered"``\ 、\ ``"reliable"``\ ,会设置底层 :ref:`MultiplayerPeer<class_MultiplayerPeer>` 的传输模式。见 :ref:`MultiplayerPeer.transfer_mode<class_MultiplayerPeer_property_transfer_mode>`\ 。
|
||||
|
||||
The ``transfer_channel`` defines the channel of the underlying :ref:`MultiplayerPeer<class_MultiplayerPeer>`. See :ref:`MultiplayerPeer.transfer_channel<class_MultiplayerPeer_property_transfer_channel>`.
|
||||
\ ``transfer_channel`` 定义的是底层 :ref:`MultiplayerPeer<class_MultiplayerPeer>` 的通道。见 :ref:`MultiplayerPeer.transfer_channel<class_MultiplayerPeer_property_transfer_channel>`\ 。
|
||||
|
||||
The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but values related to the same argument must not be used more than once. ``transfer_channel`` always has to be the 4th argument (you must specify 3 preceding arguments).
|
||||
\ ``mode``\ 、\ ``sync`` 和 ``transfer_mode`` 的顺序是无关的,但是相同参数的取值不能出现多次。\ ``transfer_channel`` 必须始终为第四个参数(前三个参数必须指定)。
|
||||
|
||||
::
|
||||
|
||||
@@ -683,7 +710,7 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value
|
||||
@rpc("any_peer", "unreliable_ordered")
|
||||
func fn_update_pos(): pass
|
||||
|
||||
@rpc("authority", "call_remote", "unreliable", 0) # Equivalent to @rpc
|
||||
@rpc("authority", "call_remote", "unreliable", 0) # 等价于 @rpc
|
||||
func fn_default(): pass
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
@@ -715,7 +742,7 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value
|
||||
@tool
|
||||
extends Node
|
||||
|
||||
\ **注意:**\ 因为注解描述对象的关系,必须把 ``@tool`` 注解放在类定义和继承之前。
|
||||
\ **注意:**\ 因为注解描述对象的关系,必须把 :ref:`@tool<class_@GDScript_annotation_@tool>` 注解放在类定义和继承之前。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -743,8 +770,8 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_@GDScript_method_Color8:
|
||||
|
||||
@@ -815,18 +842,18 @@ void **assert** **(** :ref:`bool<class_bool>` condition, :ref:`String<class_Stri
|
||||
|
||||
:ref:`Variant<class_Variant>` **convert** **(** :ref:`Variant<class_Variant>` what, :ref:`int<class_int>` type **)**
|
||||
|
||||
*Deprecated.* Use :ref:`@GlobalScope.type_convert<class_@GlobalScope_method_type_convert>` instead.
|
||||
*已弃用。*\ 请改用 :ref:`@GlobalScope.type_convert<class_@GlobalScope_method_type_convert>`\ 。
|
||||
|
||||
Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` values.
|
||||
在可能的情况下将 ``what`` 转换为 ``type`` 。 ``type`` 使用 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 值。
|
||||
|
||||
::
|
||||
|
||||
var a = [4, 2.5, 1.2]
|
||||
print(a is Array) # Prints true
|
||||
print(a is Array) # 输出 true
|
||||
|
||||
var b = convert(a, TYPE_PACKED_BYTE_ARRAY)
|
||||
print(b) # Prints [4, 2, 1]
|
||||
print(b is Array) # Prints false
|
||||
print(b) # 输出 [4, 2, 1]
|
||||
print(b is Array) # 输出 false
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1123,10 +1150,10 @@ void **print_stack** **(** **)**
|
||||
type_exists("Sprite2D") # 返回 true
|
||||
type_exists("NonExistentClass") # 返回 false
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
全局范围的枚举常量和内置函数的列表。这是所有驻留在全局的,关于错误代码、键码、属性提示等的常量。
|
||||
|
||||
@@ -25,19 +25,19 @@ Description
|
||||
|
||||
.. note::
|
||||
|
||||
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
|
||||
通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`随机数生成 <../tutorials/math/random_number_generation>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -120,8 +120,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -137,6 +137,8 @@ Methods
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`acosh<class_@GlobalScope_method_acosh>` **(** :ref:`float<class_float>` x **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`angle_difference<class_@GlobalScope_method_angle_difference>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`asin<class_@GlobalScope_method_asin>` **(** :ref:`float<class_float>` x **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`asinh<class_@GlobalScope_method_asinh>` **(** :ref:`float<class_float>` x **)** |
|
||||
@@ -293,6 +295,8 @@ Methods
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`rid_from_int64<class_@GlobalScope_method_rid_from_int64>` **(** :ref:`int<class_int>` base **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`rotate_toward<class_@GlobalScope_method_rotate_toward>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`round<class_@GlobalScope_method_round>` **(** :ref:`Variant<class_Variant>` x **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`roundf<class_@GlobalScope_method_roundf>` **(** :ref:`float<class_float>` x **)** |
|
||||
@@ -333,6 +337,8 @@ Methods
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`type_convert<class_@GlobalScope_method_type_convert>` **(** :ref:`Variant<class_Variant>` variant, :ref:`int<class_int>` type **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`type_string<class_@GlobalScope_method_type_string>` **(** :ref:`int<class_int>` type **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`typeof<class_@GlobalScope_method_typeof>` **(** :ref:`Variant<class_Variant>` variable **)** |
|
||||
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`var_to_bytes<class_@GlobalScope_method_var_to_bytes>` **(** :ref:`Variant<class_Variant>` variable **)** |
|
||||
@@ -356,8 +362,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_@GlobalScope_Side:
|
||||
|
||||
@@ -1707,7 +1713,7 @@ Mac / iPad 键盘上的“地球”键。
|
||||
|
||||
:ref:`Key<enum_@GlobalScope_Key>` **KEY_KEYBOARD** = ``4194417``
|
||||
|
||||
"On-screen keyboard" key on iPad keyboard.
|
||||
iPad 键盘上的“屏幕键盘”键。
|
||||
|
||||
.. _class_@GlobalScope_constant_KEY_JIS_EISU:
|
||||
|
||||
@@ -2579,7 +2585,7 @@ enum **JoyButton**:
|
||||
|
||||
:ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_BACK** = ``4``
|
||||
|
||||
游戏控制器 SDL back按钮。对应于 Sony Select、Xbox Back、Nintendo - 按钮。
|
||||
游戏控制器 SDL back 按钮。对应于 Sony Select、Xbox Back、Nintendo - 按钮。
|
||||
|
||||
.. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE:
|
||||
|
||||
@@ -2595,7 +2601,7 @@ enum **JoyButton**:
|
||||
|
||||
:ref:`JoyButton<enum_@GlobalScope_JoyButton>` **JOY_BUTTON_START** = ``6``
|
||||
|
||||
游戏控制器 SDL start 按钮。对应 Nintendo + 按钮。
|
||||
游戏控制器 SDL start 按钮。对应于 Sony Options、Xbox Menu、Nintendo + 按钮。
|
||||
|
||||
.. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK:
|
||||
|
||||
@@ -3419,11 +3425,11 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_RANGE** = ``1``
|
||||
|
||||
提示 :ref:`int<class_int>` 或 :ref:`float<class_float>` 属性应在提示字符串 ``"min,max"`` 或 ``"min,max,step"`` 指定的范围内。提示字符串可以选择包含 ``"or_greater"`` 和/或 ``"or_less"`` 以允许手动输入高于最大值或低于最小值的值。
|
||||
提示 :ref:`int<class_int>` 或 :ref:`float<class_float>` 属性应在提示字符串 ``"最小值,最大值"`` 或 ``"最小值,最大值,步长"`` 指定的范围内。提示字符串可以选择包含 ``"or_greater"`` 和/或 ``"or_less"``\ ,从而允许手动输入高于最大值或低于最小值的值。
|
||||
|
||||
\ **示例:**\ ``"-360,360,1,or_greater,or_less"``\ 。
|
||||
|
||||
此外,还可以包含其他关键字:\ ``"exp"`` 用于指数范围编辑,\ ``"radians"`` 用于以度数编辑弧度角,\ ``"degrees"`` 提示一个角度,以及 ``"hide_slider"`` 隐藏滑块。
|
||||
此外,还可以包含其他关键字:\ ``"exp"`` 用于指数范围编辑,\ ``"radians_as_degrees"`` 用于以度数编辑弧度角(范围的取值也使用度数),\ ``"degrees"`` 提示角度,\ ``"hide_slider"`` 则会隐藏滑块。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM:
|
||||
|
||||
@@ -3609,7 +3615,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_ID** = ``22``
|
||||
|
||||
|
||||
提示该属性的值是一个被编码为对象 ID 的对象,其类型在提示字符串中指定。被用于调试器。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING:
|
||||
|
||||
@@ -3692,7 +3698,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24``
|
||||
|
||||
|
||||
*已废弃。*\ 该提示未被用于任何地方,将来会被移除。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG:
|
||||
|
||||
@@ -3700,7 +3706,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``25``
|
||||
|
||||
|
||||
提示对象太大而无法通过调试器发送。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES:
|
||||
|
||||
@@ -3708,7 +3714,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``26``
|
||||
|
||||
|
||||
提示该提示字符串为类型 :ref:`NodePath<class_NodePath>` 的属性指定有效的节点类型。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE:
|
||||
|
||||
@@ -3716,7 +3722,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_SAVE_FILE** = ``27``
|
||||
|
||||
|
||||
提示 :ref:`String<class_String>` 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保存的路径。该对话框可以访问项目的目录。该提示字符串可以是一组带有通配符的筛选器,例如 ``"*.png,*.jpg"``\ 。另请参阅 :ref:`FileDialog.filters<class_FileDialog_property_filters>`\ 。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE:
|
||||
|
||||
@@ -3724,7 +3730,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``28``
|
||||
|
||||
|
||||
提示 :ref:`String<class_String>` 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保存的路径。该对话框可以访问整个文件系统。该提示字符串可以是一组带有通配符的筛选器,例如 ``"*.png,*.jpg"``\ 。另请参阅 :ref:`FileDialog.filters<class_FileDialog_property_filters>`\ 。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID:
|
||||
|
||||
@@ -3732,7 +3738,9 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_OBJECTID** = ``29``
|
||||
|
||||
提示 :ref:`int<class_int>` 属性是对象 ID。
|
||||
|
||||
\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER:
|
||||
|
||||
@@ -3740,7 +3748,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_INT_IS_POINTER** = ``30``
|
||||
|
||||
|
||||
提示 :ref:`int<class_int>` 属性是一个指针。用于 GDExtension。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE:
|
||||
|
||||
@@ -3748,7 +3756,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_ARRAY_TYPE** = ``31``
|
||||
|
||||
|
||||
提示属性是一个 :ref:`Array<class_Array>`\ ,其存储类型在提示字符串中指定。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID:
|
||||
|
||||
@@ -3772,7 +3780,7 @@ enum **PropertyHint**:
|
||||
|
||||
:ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` **PROPERTY_HINT_NODE_TYPE** = ``34``
|
||||
|
||||
|
||||
提示属性是 :ref:`Node<class_Node>` 派生类型的实例,可以选择通过提示字符串指定(例如 ``"Node2D"``\ )。编辑它将显示一个用于从场景中选取节点的对话框。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT:
|
||||
|
||||
@@ -3886,7 +3894,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512``
|
||||
|
||||
|
||||
该属性是一个位字段,即它包含多个被表示为位的标志。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE:
|
||||
|
||||
@@ -3918,7 +3926,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192``
|
||||
|
||||
|
||||
即使 :ref:`Object<class_Object>` 类型的属性值为 ``null``\ ,也会被存储。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED:
|
||||
|
||||
@@ -3926,7 +3934,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384``
|
||||
|
||||
|
||||
如果该属性被修改,则所有检查器字段都将被刷新。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE:
|
||||
|
||||
@@ -3934,7 +3942,9 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768``
|
||||
|
||||
表示占位符脚本实例的默认值。
|
||||
|
||||
\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM:
|
||||
|
||||
@@ -3942,7 +3952,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536``
|
||||
|
||||
|
||||
该属性是一个枚举,即它仅从其关联的枚举中获取被命名的整数常量。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT:
|
||||
|
||||
@@ -3950,7 +3960,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072``
|
||||
|
||||
|
||||
如果属性将 ``nil`` 作为默认值,则其类型将为 :ref:`Variant<class_Variant>`\ 。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY:
|
||||
|
||||
@@ -3990,7 +4000,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``4194304``
|
||||
|
||||
|
||||
:ref:`NodePath<class_NodePath>` 属性将始终相对于场景根。对于本地资源来说最有用。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT:
|
||||
|
||||
@@ -3998,7 +4008,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``8388608``
|
||||
|
||||
|
||||
在动态创建资源时使用,即 Getter 将始终返回一个不同的实例。\ :ref:`ResourceSaver<class_ResourceSaver>` 需要该信息来正确保存这种资源。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS:
|
||||
|
||||
@@ -4006,7 +4016,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``16777216``
|
||||
|
||||
|
||||
插入该属性的动画关键帧将自动增加该值,从而可以轻松地为一行中的多个值设置关键帧。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE:
|
||||
|
||||
@@ -4014,7 +4024,9 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``33554432``
|
||||
|
||||
加载时,可以在加载结束时设置该属性的资源。
|
||||
|
||||
\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT:
|
||||
|
||||
@@ -4022,7 +4034,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``67108864``
|
||||
|
||||
|
||||
当该属性为 :ref:`Resource<class_Resource>` 且基础对象为 :ref:`Node<class_Node>` 时,则每当该节点是在编辑器中创建的,都会自动创建一个资源实例。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING:
|
||||
|
||||
@@ -4030,7 +4042,7 @@ flags **PropertyUsageFlags**:
|
||||
|
||||
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``134217728``
|
||||
|
||||
|
||||
该属性被视为基本设置,即使禁用高级模式时也会显现。用于项目设置。
|
||||
|
||||
.. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY:
|
||||
|
||||
@@ -4128,7 +4140,7 @@ flags **MethodFlags**:
|
||||
|
||||
:ref:`MethodFlags<enum_@GlobalScope_MethodFlags>` **METHOD_FLAG_OBJECT_CORE** = ``64``
|
||||
|
||||
内部使用。允许不将核心虚拟方法(例如 :ref:`Object._notification<class_Object_method__notification>`\ )转储到 JSON API。
|
||||
内部使用。允许不将核心虚拟方法(例如 :ref:`Object._notification<class_Object_private_method__notification>`\ )转储到 JSON API。
|
||||
|
||||
.. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT:
|
||||
|
||||
@@ -4684,8 +4696,8 @@ enum **Variant.Operator**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_@GlobalScope_property_AudioServer:
|
||||
|
||||
@@ -4741,9 +4753,9 @@ Property Descriptions
|
||||
|
||||
:ref:`EditorInterface<class_EditorInterface>` **EditorInterface**
|
||||
|
||||
The :ref:`EditorInterface<class_EditorInterface>` singleton.
|
||||
:ref:`EditorInterface<class_EditorInterface>` 单例。
|
||||
|
||||
\ **Note:** Only available in editor builds.
|
||||
\ **注意:**\ 仅在编辑器构建中可用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5139,8 +5151,8 @@ The :ref:`EditorInterface<class_EditorInterface>` singleton.
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_@GlobalScope_method_abs:
|
||||
|
||||
@@ -5233,14 +5245,26 @@ Method Descriptions
|
||||
|
||||
:ref:`float<class_float>` **acosh** **(** :ref:`float<class_float>` x **)**
|
||||
|
||||
Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh<class_@GlobalScope_method_acosh>` from returning :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`.
|
||||
返回参数 x 的双曲弧(也称为反余弦),返回弧度值。使用它来获取在双曲空间中,如果参数 x 大于或等于 1 ,角的余弦的角度。对于参数 x 小于 1 的值,将返回 0 ,以防止 :ref:`acosh<class_@GlobalScope_method_acosh>` 返回 :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` 。
|
||||
|
||||
::
|
||||
|
||||
var a = acosh(2) # Returns 1.31695789692482
|
||||
cosh(a) # Returns 2
|
||||
var a = acosh(2) # 返回 1.31695789692482
|
||||
cosh(a) # 返回 2
|
||||
|
||||
var b = acosh(-1) # Returns 0
|
||||
var b = acosh(-1) # 返回 0
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GlobalScope_method_angle_difference:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **angle_difference** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)**
|
||||
|
||||
返回两个角度之间的差,范围为 ``[-PI, +PI]`` 。当 ``from`` 和 ``to`` 相反时,如果 ``from`` 小于 ``to``\ ,则返回 ``-PI`` ,否则返回 ``PI`` 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5269,12 +5293,12 @@ Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a va
|
||||
|
||||
:ref:`float<class_float>` **asinh** **(** :ref:`float<class_float>` x **)**
|
||||
|
||||
Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space.
|
||||
返回参数 x 的双曲弧(也称为反正弦),返回弧度值。使用它来获取在双曲空间中,角的正弦角度。
|
||||
|
||||
::
|
||||
|
||||
var a = asinh(0.9) # Returns 0.8088669356527824
|
||||
sinh(a) # Returns 0.9
|
||||
var a = asinh(0.9) # 返回 0.8088669356527824
|
||||
sinh(a) # 返回 0.9
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5324,17 +5348,17 @@ Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a valu
|
||||
|
||||
:ref:`float<class_float>` **atanh** **(** :ref:`float<class_float>` x **)**
|
||||
|
||||
Returns the hyperbolic arc (also called inverse) tangent of ``x``, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if ``x`` is between -1 and 1 (non-inclusive).
|
||||
返回 ``x`` 的双曲弧(也称为反正切),以弧度为单位。如果 ``x`` 在 -1 和 1 之间(不包括 -1 和 1 ),则使用它从双曲空间中的角度的正切值获取角度。
|
||||
|
||||
In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF<class_@GDScript_constant_INF>` and values equal or higher than 1 return positive :ref:`@GDScript.INF<class_@GDScript_constant_INF>` in order to prevent :ref:`atanh<class_@GlobalScope_method_atanh>` from returning :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`.
|
||||
在数学中,只有在实数集中,-1 < ``x`` < 1 的情况下,双曲反正切才有意义。因此,为了预防 :ref:`atanh<class_@GlobalScope_method_atanh>` 返回 :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` ,对于 ``x`` 等于或小于 -1 的值,返回负的 :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` ;对于\ ``x``\ 等于或大于 1 的值,返回正的 :ref:`@GDScript.INF<class_@GDScript_constant_INF>` 。
|
||||
|
||||
::
|
||||
|
||||
var a = atanh(0.9) # Returns 1.47221948958322
|
||||
tanh(a) # Returns 0.9
|
||||
var a = atanh(0.9) # 返回 1.47221948958322
|
||||
tanh(a) # 返回 0.9
|
||||
|
||||
var b = atanh(-2) # Returns -inf
|
||||
tanh(b) # Returns -1
|
||||
var b = atanh(-2) # 返回 -inf
|
||||
tanh(b) # 返回 -1
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5398,14 +5422,14 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`Variant<class_Variant>` **ceil** **(** :ref:`Variant<class_Variant>` x **)**
|
||||
|
||||
向上舍入 ``x``\ (朝正无穷大),返回不小于 ``x`` 的最小整数。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector4<class_Vector4>`\ 。
|
||||
向上舍入 ``x``\ (朝正无穷大方向),返回不小于 ``x`` 的最小整数。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector2i<class_Vector2i>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector3i<class_Vector3i>`\ 、\ :ref:`Vector4<class_Vector4>`\ 、\ :ref:`Vector4i<class_Vector4i>`\ 。
|
||||
|
||||
::
|
||||
|
||||
var i = ceil(1.45) # i 是 2.0
|
||||
i = ceil(1.001) # i 是 2.0
|
||||
var i = ceil(1.45) # i 为 2.0
|
||||
i = ceil(1.001) # i 为 2.0
|
||||
|
||||
另请参见 :ref:`floor<class_@GlobalScope_method_floor>`\ 、\ :ref:`round<class_@GlobalScope_method_round>`\ 、以及 :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
另见 :ref:`floor<class_@GlobalScope_method_floor>`\ 、\ :ref:`round<class_@GlobalScope_method_round>`\ 、\ :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
|
||||
\ **注意:**\ 为了更好的类型安全,使用 :ref:`ceilf<class_@GlobalScope_method_ceilf>`\ 、\ :ref:`ceili<class_@GlobalScope_method_ceili>`\ 、\ :ref:`Vector2.ceil<class_Vector2_method_ceil>`\ 、\ :ref:`Vector3.ceil<class_Vector3_method_ceil>` 或 :ref:`Vector4.ceil<class_Vector4_method_ceil>`\ 。
|
||||
|
||||
@@ -5555,7 +5579,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`float<class_float>` **cubic_interpolate** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)**
|
||||
|
||||
根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。
|
||||
根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5567,7 +5591,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`float<class_float>` **cubic_interpolate_angle** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight **)**
|
||||
|
||||
根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在具有最短路径的两个旋转值之间三次插值 。另见 :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`\ 。
|
||||
根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个旋转值之间的最短路径进行三次插值 。另见 :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5579,9 +5603,9 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`float<class_float>` **cubic_interpolate_angle_in_time** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)**
|
||||
|
||||
根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在具有最短路径的两个旋转值之间进行三次插值。另见 :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`\ 。
|
||||
根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个旋转值之间的最短路径进行三次插值。另见 :ref:`lerp_angle<class_@GlobalScope_method_lerp_angle>`\ 。
|
||||
|
||||
它可以根据时间值执行比 ``cubic_interpolate()`` 更平滑的插值。
|
||||
它可以根据时间值执行比 :ref:`cubic_interpolate<class_@GlobalScope_method_cubic_interpolate>` 更平滑的插值。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5593,7 +5617,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`float<class_float>` **cubic_interpolate_in_time** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` pre, :ref:`float<class_float>` post, :ref:`float<class_float>` weight, :ref:`float<class_float>` to_t, :ref:`float<class_float>` pre_t, :ref:`float<class_float>` post_t **)**
|
||||
|
||||
根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。
|
||||
根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。
|
||||
|
||||
它可以根据时间值执行比 :ref:`cubic_interpolate<class_@GlobalScope_method_cubic_interpolate>` 更平滑的插值。
|
||||
|
||||
@@ -5635,21 +5659,21 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` <
|
||||
|
||||
:ref:`float<class_float>` **ease** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` curve **)**
|
||||
|
||||
Returns an "eased" value of ``x`` based on an easing function defined with ``curve``. This easing function is based on an exponent. The ``curve`` can be any floating-point number, with specific values leading to the following behaviors:
|
||||
基于用 ``curve`` 定义的缓动函数返回 ``x`` 的“缓动后”的值。该缓动函数是基于指数的。\ ``curve`` 可以是任意浮点数,具体数值会导致以下行为:
|
||||
|
||||
::
|
||||
|
||||
- Lower than -1.0 (exclusive): Ease in-out
|
||||
- 1.0: Linear
|
||||
- Between -1.0 and 0.0 (exclusive): Ease out-in
|
||||
- 0.0: Constant
|
||||
- Between 0.0 to 1.0 (exclusive): Ease out
|
||||
- 1.0: Linear
|
||||
- Greater than 1.0 (exclusive): Ease in
|
||||
- 低于 -1.0(开区间):缓入缓出
|
||||
- -1.0:线性
|
||||
- 在 -1.0 和 0.0 之间(开区间):缓出缓入
|
||||
- 0.0:恒定
|
||||
- 在 0.0 到 1.0 之间(开区间):缓出
|
||||
- 1.0:线性
|
||||
- 大于 1.0(开区间):缓入
|
||||
|
||||
\ `ease() curve values cheatsheet <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png>`__\
|
||||
\ `ease() 曲线值速查表 <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png>`__\
|
||||
|
||||
See also :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value<class_Tween_method_interpolate_value>`.
|
||||
另见 :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`\ 。如果你需要执行更高级的过渡,请使用 :ref:`Tween.interpolate_value<class_Tween_method_interpolate_value>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5680,15 +5704,15 @@ See also :ref:`smoothstep<class_@GlobalScope_method_smoothstep>`. If you need to
|
||||
|
||||
:ref:`float<class_float>` **exp** **(** :ref:`float<class_float>` x **)**
|
||||
|
||||
The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it.
|
||||
自然指数函数。计算数学常数 *e* 的 ``x`` 次方并返回它。
|
||||
|
||||
\ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``.
|
||||
\ *e* 的近似值为 2.71828,可以使用 ``exp(1)`` 获得。
|
||||
|
||||
For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_pow>`.
|
||||
求其他底数的指数应使用 :ref:`pow<class_@GlobalScope_method_pow>` 方法。
|
||||
|
||||
::
|
||||
|
||||
var a = exp(2) # Approximately 7.39
|
||||
var a = exp(2) # 大约是 7.39
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -5700,14 +5724,14 @@ For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_
|
||||
|
||||
:ref:`Variant<class_Variant>` **floor** **(** :ref:`Variant<class_Variant>` x **)**
|
||||
|
||||
向下舍入 ``x``\ (朝负无穷大),返回不大于 ``x`` 的最大整数。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector4<class_Vector4>`\ 。
|
||||
向下舍入 ``x``\ (朝负无穷大),返回不大于 ``x`` 的最大整数。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector2i<class_Vector2i>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector3i<class_Vector3i>`\ 、\ :ref:`Vector4<class_Vector4>`\ 、\ :ref:`Vector4i<class_Vector4i>`\ 。
|
||||
|
||||
::
|
||||
|
||||
var a = floor(2.99) # a 是 2.0
|
||||
a = floor(-2.99) # a 是 -3.0
|
||||
var a = floor(2.99) # a 为 2.0
|
||||
a = floor(-2.99) # a 为 -3.0
|
||||
|
||||
另请参阅 :ref:`ceil<class_@GlobalScope_method_ceil>`\ 、\ :ref:`round<class_@GlobalScope_method_round>`\ 、以及 :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
另见 :ref:`ceil<class_@GlobalScope_method_ceil>`\ 、\ :ref:`round<class_@GlobalScope_method_round>`\ 、\ :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
|
||||
\ **注意:**\ 为了更好的类型安全,请使用 :ref:`floorf<class_@GlobalScope_method_floorf>`\ 、\ :ref:`floori<class_@GlobalScope_method_floori>`\ 、\ :ref:`Vector2.floor<class_Vector2_method_floor>`\ 、\ :ref:`Vector3.floor<class_Vector3_method_floor>` 或 :ref:`Vector4.floor<class_Vector4_method_floor>`\ 。
|
||||
|
||||
@@ -6240,18 +6264,18 @@ For exponents to other bases use the method :ref:`pow<class_@GlobalScope_method_
|
||||
|
||||
:ref:`int<class_int>` **nearest_po2** **(** :ref:`int<class_int>` value **)**
|
||||
|
||||
Returns the smallest integer power of 2 that is greater than or equal to ``value``.
|
||||
返回大于等于 ``value`` 的最小的 2 的幂。
|
||||
|
||||
::
|
||||
|
||||
nearest_po2(3) # Returns 4
|
||||
nearest_po2(4) # Returns 4
|
||||
nearest_po2(5) # Returns 8
|
||||
nearest_po2(3) # 返回 4
|
||||
nearest_po2(4) # 返回 4
|
||||
nearest_po2(5) # 返回 8
|
||||
|
||||
nearest_po2(0) # Returns 0 (this may not be expected)
|
||||
nearest_po2(-1) # Returns 0 (this may not be expected)
|
||||
nearest_po2(0) # 返回 0(可能出乎意料)
|
||||
nearest_po2(-1) # 返回 0(可能出乎意料)
|
||||
|
||||
\ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged.
|
||||
\ **警告:**\ 由于其实现方式,该函数会对小于等于 ``0`` 的值返回 ``0`` 而不是 ``1``\ ,例外是 ``value`` 为最小的负 64 位整数(\ ``-9223372036854775808``\ )时,会将 ``value`` 原样返回。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6785,13 +6809,29 @@ void **randomize** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GlobalScope_method_rotate_toward:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **rotate_toward** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` delta **)**
|
||||
|
||||
将 ``from`` 朝 ``to`` 旋转,旋转的量为 ``delta``\ 。不会越过 ``to``\ 。
|
||||
|
||||
与 :ref:`move_toward<class_@GlobalScope_method_move_toward>` 类似,但是能够让夹角正确绕过 :ref:`@GDScript.TAU<class_@GDScript_constant_TAU>`\ 。
|
||||
|
||||
如果 ``delta`` 为负,则该函数会进行远离 ``to`` 的旋转,朝向相反的角度,但不会越过该角度。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GlobalScope_method_round:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **round** **(** :ref:`Variant<class_Variant>` x **)**
|
||||
|
||||
将 ``x`` 舍入到最接近的整数,中间情况远离 0 舍入。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector4<class_Vector4>`\ 。
|
||||
将 ``x`` 舍入到最接近的整数,中间情况远离 0 舍入。支持的类型:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector2i<class_Vector2i>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector3i<class_Vector3i>`\ 、\ :ref:`Vector4<class_Vector4>`\ 、\ :ref:`Vector4i<class_Vector4i>`\ 。
|
||||
|
||||
::
|
||||
|
||||
@@ -6799,7 +6839,7 @@ void **randomize** **(** **)**
|
||||
round(2.5) # 返回 3
|
||||
round(2.6) # 返回 3
|
||||
|
||||
另请参见 :ref:`floor<class_@GlobalScope_method_floor>`\ 、\ :ref:`ceil<class_@GlobalScope_method_ceil>` 和 :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
另见 :ref:`floor<class_@GlobalScope_method_floor>`\ 、\ :ref:`ceil<class_@GlobalScope_method_ceil>`\ 、\ :ref:`snapped<class_@GlobalScope_method_snapped>`\ 。
|
||||
|
||||
\ **注意:**\ 为了更好的类型安全,使用 :ref:`roundf<class_@GlobalScope_method_roundf>`\ 、\ :ref:`roundi<class_@GlobalScope_method_roundi>`\ 、\ :ref:`Vector2.round<class_Vector2_method_round>`\ 、\ :ref:`Vector3.round<class_Vector3_method_round>` 或 :ref:`Vector4.round<class_Vector4_method_round>`\ 。
|
||||
|
||||
@@ -6876,20 +6916,20 @@ void **seed** **(** :ref:`int<class_int>` base **)**
|
||||
|
||||
:ref:`Variant<class_Variant>` **sign** **(** :ref:`Variant<class_Variant>` x **)**
|
||||
|
||||
Returns the same type of :ref:`Variant<class_Variant>` as ``x``, with ``-1`` for negative values, ``1`` for positive values, and ``0`` for zeros. For ``nan`` values it returns 0.
|
||||
返回与 ``x`` 相同类型的 :ref:`Variant<class_Variant>`\ ,负值返回 ``-1``\ 、正值返回 ``1``\ ,零则返回 ``0``\ 。如果是 ``nan`` 则返回 0。
|
||||
|
||||
Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2<class_Vector2>`, :ref:`Vector2i<class_Vector2i>`, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`.
|
||||
支持的类型有:\ :ref:`int<class_int>`\ 、\ :ref:`float<class_float>`\ 、\ :ref:`Vector2<class_Vector2>`\ 、\ :ref:`Vector2i<class_Vector2i>`\ 、\ :ref:`Vector3<class_Vector3>`\ 、\ :ref:`Vector3i<class_Vector3i>`\ 、\ :ref:`Vector4<class_Vector4>`\ 、\ :ref:`Vector4i<class_Vector4i>`\ 。
|
||||
|
||||
::
|
||||
|
||||
sign(-6.0) # Returns -1
|
||||
sign(0.0) # Returns 0
|
||||
sign(6.0) # Returns 1
|
||||
sign(NAN) # Returns 0
|
||||
sign(-6.0) # 返回 -1
|
||||
sign(0.0) # 返回 0
|
||||
sign(6.0) # 返回 1
|
||||
sign(NAN) # 返回 0
|
||||
|
||||
sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)
|
||||
sign(Vector3(-6.0, 0.0, 6.0)) # 返回 (-1, 0, 1)
|
||||
|
||||
\ **Note:** For better type safety, use :ref:`signf<class_@GlobalScope_method_signf>`, :ref:`signi<class_@GlobalScope_method_signi>`, :ref:`Vector2.sign<class_Vector2_method_sign>`, :ref:`Vector2i.sign<class_Vector2i_method_sign>`, :ref:`Vector3.sign<class_Vector3_method_sign>`, :ref:`Vector3i.sign<class_Vector3i_method_sign>`, :ref:`Vector4.sign<class_Vector4_method_sign>`, or :ref:`Vector4i.sign<class_Vector4i_method_sign>`.
|
||||
\ **注意:**\ 为了更好的类型安全,请使用 :ref:`signf<class_@GlobalScope_method_signf>`\ 、\ :ref:`signi<class_@GlobalScope_method_signi>`\ 、\ :ref:`Vector2.sign<class_Vector2_method_sign>`\ 、\ :ref:`Vector2i.sign<class_Vector2i_method_sign>`\ 、\ :ref:`Vector3.sign<class_Vector3_method_sign>`\ 、\ :ref:`Vector3i.sign<class_Vector3i_method_sign>`\ 、\ :ref:`Vector4.sign<class_Vector4_method_sign>` 或 :ref:`Vector4i.sign<class_Vector4i_method_sign>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6901,14 +6941,14 @@ Supported types: :ref:`int<class_int>`, :ref:`float<class_float>`, :ref:`Vector2
|
||||
|
||||
:ref:`float<class_float>` **signf** **(** :ref:`float<class_float>` x **)**
|
||||
|
||||
Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero. For ``nan`` values of ``x`` it returns 0.0.
|
||||
如果 ``x`` 为负,则返回 ``-1.0``\ ;如果 ``x`` 为正,则返回 ``1.0``\ ;如果 ``x`` 为零,则返回 ``0.0``\ 。如果 ``x`` 为 ``nan`` 则返回 0.0。
|
||||
|
||||
::
|
||||
|
||||
signf(-6.5) # Returns -1.0
|
||||
signf(0.0) # Returns 0.0
|
||||
signf(6.5) # Returns 1.0
|
||||
signf(NAN) # Returns 0.0
|
||||
signf(-6.5) # 返回 -1.0
|
||||
signf(0.0) # 返回 0.0
|
||||
signf(6.5) # 返回 1.0
|
||||
signf(NAN) # 返回 0.0
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -6972,22 +7012,22 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0``
|
||||
|
||||
:ref:`float<class_float>` **smoothstep** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` x **)**
|
||||
|
||||
Returns the result of smoothly interpolating the value of ``x`` between ``0`` and ``1``, based on the where ``x`` lies with respect to the edges ``from`` and ``to``.
|
||||
返回 ``x`` 在 ``0`` 和 ``1`` 之间平滑插值的结果,基于 ``x`` 相对于边 ``from`` 和 ``to`` 的位置。
|
||||
|
||||
The return value is ``0`` if ``x <= from``, and ``1`` if ``x >= to``. If ``x`` lies between ``from`` and ``to``, the returned value follows an S-shaped curve that maps ``x`` between ``0`` and ``1``.
|
||||
如果 ``x <= from``\ ,则返回值为 ``0``\ ;如果 ``x >= to``\ ,则返回值为 ``1``\ 。如果 ``x`` 位于 ``from`` 和 ``to`` 之间,则返回值遵循一条将 ``x`` 映射到 ``0`` 和 ``1`` 之间的 S 形曲线。
|
||||
|
||||
This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - 2*y^3`` where ``y = (x-from) / (to-from)``.
|
||||
这条 S 形曲线是三次 Hermite 插值器,由 ``f(y) = 3*y^2 - 2*y^3`` 给出,其中 ``y = (x-from) / (to-from)``\ 。
|
||||
|
||||
::
|
||||
|
||||
smoothstep(0, 2, -5.0) # Returns 0.0
|
||||
smoothstep(0, 2, 0.5) # Returns 0.15625
|
||||
smoothstep(0, 2, 1.0) # Returns 0.5
|
||||
smoothstep(0, 2, 2.0) # Returns 1.0
|
||||
smoothstep(0, 2, -5.0) # 返回 0.0
|
||||
smoothstep(0, 2, 0.5) # 返回 0.15625
|
||||
smoothstep(0, 2, 1.0) # 返回 0.5
|
||||
smoothstep(0, 2, 2.0) # 返回 1.0
|
||||
|
||||
Compared to :ref:`ease<class_@GlobalScope_method_ease>` with a curve value of ``-1.6521``, :ref:`smoothstep<class_@GlobalScope_method_smoothstep>` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween<class_Tween>` or :ref:`AnimationPlayer<class_AnimationPlayer>`.
|
||||
与曲线值为 ``-1.6521`` 的 :ref:`ease<class_@GlobalScope_method_ease>` 相比,\ :ref:`smoothstep<class_@GlobalScope_method_smoothstep>` 返回最平滑的曲线,导数没有突然变化。如果需要执行更高级的过渡,请使用 :ref:`Tween<class_Tween>` 或 :ref:`AnimationPlayer<class_AnimationPlayer>`\ 。
|
||||
|
||||
\ `Comparison between smoothstep() and ease(x, -1.6521) return values <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png>`__
|
||||
\ `smoothstep() 与 ease(x, -1.6521) 返回值的比较 <https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png>`__
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -7181,19 +7221,39 @@ Compared to :ref:`ease<class_@GlobalScope_method_ease>` with a curve value of ``
|
||||
|
||||
:ref:`Variant<class_Variant>` **type_convert** **(** :ref:`Variant<class_Variant>` variant, :ref:`int<class_int>` type **)**
|
||||
|
||||
Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric :ref:`String<class_String>`\ s to :ref:`int<class_int>`, and converting most things to :ref:`String<class_String>`.
|
||||
使用 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 值将给定的 ``variant`` 转换为给定的 ``type``\ 。此方法对类型的处理十分宽松,可以在数组类型之间自动转换,将数值的 :ref:`String<class_String>` 转换为 :ref:`int<class_int>`\ ,也可以将大多数内容转换为 :ref:`String<class_String>`\ 。
|
||||
|
||||
If the type conversion cannot be done, this method will return the default value for that type, for example converting :ref:`Rect2<class_Rect2>` to :ref:`Vector2<class_Vector2>` will always return ``Vector2.ZERO``. This method will never show error messages as long as ``type`` is a valid Variant type.
|
||||
如果无法完成类型转换,此方法将返回该类型的默认值,例如 :ref:`Rect2<class_Rect2>` 转换为 :ref:`Vector2<class_Vector2>` 时将总是返回 :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`\ 。只要 ``type`` 是一个有效的 Variant 类型,此方法就永远不会显示错误消息。
|
||||
|
||||
The returned value is a :ref:`Variant<class_Variant>`, but the data inside and the :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` will be the same as the requested type.
|
||||
返回的值是一个 :ref:`Variant<class_Variant>`\ ,但是其中的数据以及 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 将会与请求的类型相同。
|
||||
|
||||
::
|
||||
|
||||
type_convert("Hi!", TYPE_INT) # Returns 0
|
||||
type_convert("123", TYPE_INT) # Returns 123
|
||||
type_convert(123.4, TYPE_INT) # Returns 123
|
||||
type_convert(5, TYPE_VECTOR2) # Returns (0, 0)
|
||||
type_convert("Hi!", TYPE_NIL) # Returns null
|
||||
type_convert("Hi!", TYPE_INT) # 返回 0
|
||||
type_convert("123", TYPE_INT) # 返回 123
|
||||
type_convert(123.4, TYPE_INT) # 返回 123
|
||||
type_convert(5, TYPE_VECTOR2) # 返回 (0, 0)
|
||||
type_convert("Hi!", TYPE_NIL) # 返回 null
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_@GlobalScope_method_type_string:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`String<class_String>` **type_string** **(** :ref:`int<class_int>` type **)**
|
||||
|
||||
返回类型 ``type`` 的人类可读名称,参数使用 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 的值。
|
||||
|
||||
::
|
||||
|
||||
print(TYPE_INT) # 输出 2。
|
||||
print(type_string(TYPE_INT)) # 输出“int”。
|
||||
print(type_string(TYPE_STRING)) # 输出“String”。
|
||||
|
||||
另见 :ref:`typeof<class_@GlobalScope_method_typeof>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -7205,7 +7265,7 @@ The returned value is a :ref:`Variant<class_Variant>`, but the data inside and t
|
||||
|
||||
:ref:`int<class_int>` **typeof** **(** :ref:`Variant<class_Variant>` variable **)**
|
||||
|
||||
使用 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 值返回给定 ``variable`` 的内部类型。
|
||||
返回变量 ``variable`` 的内部类型,使用的是 :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` 中的值。
|
||||
|
||||
::
|
||||
|
||||
@@ -7217,6 +7277,8 @@ The returned value is a :ref:`Variant<class_Variant>`, but the data inside and t
|
||||
else:
|
||||
print("出乎意料的结果")
|
||||
|
||||
另见 :ref:`type_string<class_@GlobalScope_method_type_string>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -7291,7 +7353,7 @@ The returned value is a :ref:`Variant<class_Variant>`, but the data inside and t
|
||||
|
||||
:ref:`Variant<class_Variant>` **weakref** **(** :ref:`Variant<class_Variant>` obj **)**
|
||||
|
||||
返回对某个对象的弱引用,如果 ``obj`` 无效,则返回 ``null``\ 。
|
||||
返回一个 :ref:`WeakRef<class_WeakRef>` 实例,其中包含对 ``obj`` 的弱引用。如果 ``obj`` 为 ``null``\ ,则返回空的 :ref:`WeakRef<class_WeakRef>` 实例。如果 ``obj`` 既不是 :ref:`Object<class_Object>` 派生实例,也不是 ``null``\ ,则打印错误并返回 ``null``\ 。
|
||||
|
||||
对对象的弱引用不足以使对象保持存活:当对引用对象的剩余引用都是弱引用时,垃圾回收可以自由销毁该引用对象并将其内存重新用于其他用途。但是,在对象实际被销毁之前,弱引用可能会返回该对象,即使不存在对它的强引用也是如此。
|
||||
|
||||
@@ -7349,7 +7411,7 @@ The returned value is a :ref:`Variant<class_Variant>`, but the data inside and t
|
||||
|
||||
\ **注意:**\ 如果 ``min`` 为 ``0``\ ,则相当于 :ref:`fposmod<class_@GlobalScope_method_fposmod>`\ ,因此请改用它。
|
||||
|
||||
通过让用户控制最小值,\ ``wrapf`` 比使用 :ref:`fposmod<class_@GlobalScope_method_fposmod>` 方法更灵活。
|
||||
通过让用户控制最小值,\ :ref:`wrapf<class_@GlobalScope_method_wrapf>` 比使用 :ref:`fposmod<class_@GlobalScope_method_fposmod>` 方法更灵活。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -7373,10 +7435,10 @@ The returned value is a :ref:`Variant<class_Variant>`, but the data inside and t
|
||||
# result 是 -2
|
||||
var result = wrapi(-6, -5, -1)
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -14,8 +14,8 @@ AABB
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AABB** 由一个位置、一个大小和若干实用函数组成。通常用于快速重叠测试。
|
||||
|
||||
@@ -27,12 +27,12 @@ Description
|
||||
|
||||
.. note::
|
||||
|
||||
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
|
||||
通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`数学文档索引 <../tutorials/math/index>`
|
||||
|
||||
@@ -42,8 +42,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -58,8 +58,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Constructors
|
||||
------------
|
||||
构造函数
|
||||
--------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -74,8 +74,8 @@ Constructors
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -134,8 +134,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Operators
|
||||
---------
|
||||
操作符
|
||||
------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -154,8 +154,8 @@ Operators
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AABB_property_end:
|
||||
|
||||
@@ -197,8 +197,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constructor Descriptions
|
||||
------------------------
|
||||
构造函数说明
|
||||
------------
|
||||
|
||||
.. _class_AABB_constructor_AABB:
|
||||
|
||||
@@ -234,8 +234,8 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AABB_method_abs:
|
||||
|
||||
@@ -396,7 +396,7 @@ Method Descriptions
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_support** **(** :ref:`Vector3<class_Vector3>` dir **)** |const|
|
||||
|
||||
Returns the vertex of the AABB that's the farthest in a given direction. This point is commonly known as the support point in collision detection algorithms.
|
||||
返回指定方向上最远的 AABB 顶点。该点通常称为碰撞检测算法的支撑点。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -562,8 +562,8 @@ Returns the vertex of the AABB that's the farthest in a given direction. This po
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Operator Descriptions
|
||||
---------------------
|
||||
操作符说明
|
||||
----------
|
||||
|
||||
.. _class_AABB_operator_neq_AABB:
|
||||
|
||||
@@ -585,7 +585,11 @@ Operator Descriptions
|
||||
|
||||
:ref:`AABB<class_AABB>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)**
|
||||
|
||||
通过给定的 :ref:`Transform3D<class_Transform3D>` 变换矩阵对该 **AABB** 进行逆变换(相乘)。
|
||||
假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不行),将 **AABB** 逆向变换(乘以)给定的 :ref:`Transform3D<class_Transform3D>` 变换矩阵。
|
||||
|
||||
\ ``aabb * transform`` 相当于 ``transform.inverse() * aabb``\ 。见 :ref:`Transform3D.inverse<class_Transform3D_method_inverse>`\ 。
|
||||
|
||||
对于通过仿射变换的逆进行的变换(例如,缩放),可以使用 ``transform.affine_inverse() * aabb`` 代替。见 :ref:`Transform3D.affine_inverse<class_Transform3D_method_affine_inverse>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -601,10 +605,10 @@ Operator Descriptions
|
||||
|
||||
\ **注意:**\ 由于浮点数精度误差,请考虑改用 :ref:`is_equal_approx<class_AABB_method_is_equal_approx>`\ ,会更可靠。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,53 +10,55 @@
|
||||
AcceptDialog
|
||||
============
|
||||
|
||||
**Inherits:** :ref:`Window<class_Window>` **<** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Window<class_Window>` **<** :ref:`Viewport<class_Viewport>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`ConfirmationDialog<class_ConfirmationDialog>`
|
||||
**派生:** :ref:`ConfirmationDialog<class_ConfirmationDialog>`
|
||||
|
||||
用于用户通知的基本对话框。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AcceptDialog** 的默认用途是允许它只被接受或关闭,结果相同。但是,\ :ref:`confirmed<class_AcceptDialog_signal_confirmed>` 和 :ref:`canceled<class_AcceptDialog_signal_canceled>` 信号允许使两个动作不同,\ :ref:`add_button<class_AcceptDialog_method_add_button>` 方法允许添加自定义按钮和动作。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_autowrap<class_AcceptDialog_property_dialog_autowrap>` | ``false`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_close_on_escape<class_AcceptDialog_property_dialog_close_on_escape>` | ``true`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_hide_on_ok<class_AcceptDialog_property_dialog_hide_on_ok>` | ``true`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`dialog_text<class_AcceptDialog_property_dialog_text>` | ``""`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | exclusive | ``true`` (overrides :ref:`Window<class_Window_property_exclusive>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`ok_button_text<class_AcceptDialog_property_ok_button_text>` | ``"OK"`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | title | ``"Alert!"`` (overrides :ref:`Window<class_Window_property_title>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | transient | ``true`` (overrides :ref:`Window<class_Window_property_transient>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | visible | ``false`` (overrides :ref:`Window<class_Window_property_visible>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | wrap_controls | ``true`` (overrides :ref:`Window<class_Window_property_wrap_controls>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_autowrap<class_AcceptDialog_property_dialog_autowrap>` | ``false`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_close_on_escape<class_AcceptDialog_property_dialog_close_on_escape>` | ``true`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`dialog_hide_on_ok<class_AcceptDialog_property_dialog_hide_on_ok>` | ``true`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`dialog_text<class_AcceptDialog_property_dialog_text>` | ``""`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | exclusive | ``true`` (overrides :ref:`Window<class_Window_property_exclusive>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | keep_title_visible | ``true`` (overrides :ref:`Window<class_Window_property_keep_title_visible>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`ok_button_text<class_AcceptDialog_property_ok_button_text>` | ``"OK"`` |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | title | ``"Alert!"`` (overrides :ref:`Window<class_Window_property_title>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | transient | ``true`` (overrides :ref:`Window<class_Window_property_transient>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | visible | ``false`` (overrides :ref:`Window<class_Window_property_visible>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | wrap_controls | ``true`` (overrides :ref:`Window<class_Window_property_wrap_controls>`) |
|
||||
+-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -77,8 +79,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Theme Properties
|
||||
----------------
|
||||
主题属性
|
||||
--------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -95,8 +97,8 @@ Theme Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AcceptDialog_signal_canceled:
|
||||
|
||||
@@ -136,8 +138,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AcceptDialog_property_dialog_autowrap:
|
||||
|
||||
@@ -228,8 +230,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AcceptDialog_method_add_button:
|
||||
|
||||
@@ -315,8 +317,8 @@ void **remove_button** **(** :ref:`Control<class_Control>` button **)**
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Theme Property Descriptions
|
||||
---------------------------
|
||||
主题属性说明
|
||||
------------
|
||||
|
||||
.. _class_AcceptDialog_theme_constant_buttons_separation:
|
||||
|
||||
@@ -338,10 +340,10 @@ Theme Property Descriptions
|
||||
|
||||
填充窗口背景的面板。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AESContext
|
||||
==========
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
提供对原始数据的 AES 加密/解密的访问。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
这个类存放的是进行 AES(Advanced Encryption Standard,高级加密标准)加解密所需的上下文信息。支持 AES-ECB 和 AES-CBC 两种模式。
|
||||
|
||||
@@ -98,8 +98,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -120,8 +120,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AESContext_Mode:
|
||||
|
||||
@@ -175,8 +175,8 @@ AES 密码封锁器链式解密模式。
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AESContext_method_finish:
|
||||
|
||||
@@ -226,10 +226,10 @@ void **finish** **(** **)**
|
||||
|
||||
\ **注意:**\ ``src`` 的大小必须是 16 倍的倍数。如果需要,应用一些填充。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
AnimatableBody2D
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`StaticBody2D<class_StaticBody2D>` **<** :ref:`PhysicsBody2D<class_PhysicsBody2D>` **<** :ref:`CollisionObject2D<class_CollisionObject2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`StaticBody2D<class_StaticBody2D>` **<** :ref:`PhysicsBody2D<class_PhysicsBody2D>` **<** :ref:`CollisionObject2D<class_CollisionObject2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
无法被外力移动的 2D 物理物体。手动移动时会影响路径上的其他物体。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer<class_AnimationPlayer>`\ s (with :ref:`AnimationPlayer.playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS<class_AnimationPlayer_constant_ANIMATION_PROCESS_PHYSICS>`), and :ref:`RemoteTransform2D<class_RemoteTransform2D>`.
|
||||
可动画的 2D 物理物体。无法因外力和接触而移动,但可以通过代码、\ :ref:`AnimationMixer<class_AnimationMixer>`\ (\ :ref:`AnimationMixer.callback_mode_process<class_AnimationMixer_property_callback_mode_process>` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`\ )、\ :ref:`RemoteTransform2D<class_RemoteTransform2D>` 等方法手动移动。
|
||||
|
||||
When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects.
|
||||
\ **AnimatableBody2D** 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上的其他物理物体。因此适用于移动平台、门等移动的对象。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -41,8 +41,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatableBody2D_property_sync_to_physics:
|
||||
|
||||
@@ -57,10 +57,10 @@ Property Descriptions
|
||||
|
||||
如果为 ``true``\ ,则物体的运动将与物理帧同步。当通过 :ref:`AnimationPlayer<class_AnimationPlayer>` 为运动设置动画时,例如在移动的平台上,这个功能很有用。\ **不要**\ 与\ :ref:`PhysicsBody2D.move_and_collide<class_PhysicsBody2D_method_move_and_collide>`\ 一起使用。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
AnimatableBody3D
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`StaticBody3D<class_StaticBody3D>` **<** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`StaticBody3D<class_StaticBody3D>` **<** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
无法被外力移动的 3D 物理物体。手动移动时会影响路径上的其他物体。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer<class_AnimationPlayer>`\ s (with :ref:`AnimationPlayer.playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS<class_AnimationPlayer_constant_ANIMATION_PROCESS_PHYSICS>`), and :ref:`RemoteTransform3D<class_RemoteTransform3D>`.
|
||||
可动画的 3D 物理物体。无法因外力或接触而移动,但可以通过代码、\ :ref:`AnimationMixer<class_AnimationMixer>`\ (\ :ref:`AnimationMixer.callback_mode_process<class_AnimationMixer_property_callback_mode_process>` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`\ )、\ :ref:`RemoteTransform3D<class_RemoteTransform3D>` 等方法手动移动。
|
||||
|
||||
When **AnimatableBody3D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects.
|
||||
\ **AnimatableBody3D** 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上的其他物理物体。因此适用于移动平台、门等移动的对象。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `3D 物理测试演示 <https://godotengine.org/asset-library/asset/675>`__
|
||||
|
||||
@@ -36,8 +36,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -52,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatableBody3D_property_sync_to_physics:
|
||||
|
||||
@@ -68,10 +68,10 @@ Property Descriptions
|
||||
|
||||
如果为 ``true``\ ,则实体的运动将与物理帧同步。当通过 :ref:`AnimationPlayer<class_AnimationPlayer>` 为运动设置动画时,例如在移动的平台上,这个功能很有用。请\ **不要**\ 与 :ref:`PhysicsBody3D.move_and_collide<class_PhysicsBody3D_method_move_and_collide>` 函数一起使用。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AnimatedSprite2D
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
包含多个纹理作为动画播放帧的 Sprite 节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AnimatedSprite2D** 与 :ref:`Sprite2D<class_Sprite2D>` 节点类似,但是包含多张纹理,可用作动画帧。动画使用 :ref:`SpriteFrames<class_SpriteFrames>` 资源创建,可以导入图像文件(或包含此类文件的文件夹)为该精灵提供动画帧。可以在编辑器的“动画帧”底部面板中配置 :ref:`SpriteFrames<class_SpriteFrames>` 资源。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`2D 精灵动画 <../tutorials/2d/2d_sprite_animation>`
|
||||
|
||||
@@ -32,8 +32,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -62,8 +62,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -90,8 +90,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimatedSprite2D_signal_animation_changed:
|
||||
|
||||
@@ -155,8 +155,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedSprite2D_property_animation:
|
||||
|
||||
@@ -332,8 +332,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedSprite2D_method_get_playing_speed:
|
||||
|
||||
@@ -440,10 +440,10 @@ void **stop** **(** **)**
|
||||
|
||||
停止当前正在播放的动画。会将动画的位置重置为 ``0``\ ,并将 ``custom_speed`` 重置为 ``1.0``\ 。另见 :ref:`pause<class_AnimatedSprite2D_method_pause>`\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AnimatedSprite3D
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`SpriteBase3D<class_SpriteBase3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`SpriteBase3D<class_SpriteBase3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
3D 世界中的 2D 精灵节点,可以使用多个 2D 纹理进行动画处理。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AnimatedSprite3D** 与 :ref:`Sprite3D<class_Sprite3D>` 节点类似,但是包含多张纹理,可用作动画 :ref:`sprite_frames<class_AnimatedSprite3D_property_sprite_frames>`\ 。动画使用 :ref:`SpriteFrames<class_SpriteFrames>` 资源创建,可以导入图像文件(或包含此类文件的文件夹)为该精灵提供动画帧。可以在编辑器的“动画帧”底部面板中配置 :ref:`SpriteFrames<class_SpriteFrames>` 资源。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`2D 精灵动画(也适用于 3D) <../tutorials/2d/2d_sprite_animation>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -52,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -80,8 +80,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimatedSprite3D_signal_animation_changed:
|
||||
|
||||
@@ -145,8 +145,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedSprite3D_property_animation:
|
||||
|
||||
@@ -254,8 +254,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedSprite3D_method_get_playing_speed:
|
||||
|
||||
@@ -362,10 +362,10 @@ void **stop** **(** **)**
|
||||
|
||||
停止当前正在播放的动画。会将动画的位置重置为 ``0``\ ,并将 ``custom_speed`` 重置为 ``1.0``\ 。另见 :ref:`pause<class_AnimatedSprite3D_method_pause>`\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimatedTexture
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于简单帧动画的代理纹理。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AnimatedTexture** 是一种用于帧动画的资源格式,其中多个纹理可以自动链接,每个帧都有预定义的延迟。与 :ref:`AnimationPlayer<class_AnimationPlayer>` 或 :ref:`AnimatedSprite2D<class_AnimatedSprite2D>` 不同,它不是 :ref:`Node<class_Node>`\ ,但具有可在任何可以使用 :ref:`Texture2D<class_Texture2D>` 资源的地方使用的优势,例如在 :ref:`TileSet<class_TileSet>` 中。
|
||||
|
||||
@@ -33,8 +33,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -55,8 +55,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -77,8 +77,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constants
|
||||
---------
|
||||
常量
|
||||
----
|
||||
|
||||
.. _class_AnimatedTexture_constant_MAX_FRAMES:
|
||||
|
||||
@@ -94,8 +94,8 @@ Constants
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedTexture_property_current_frame:
|
||||
|
||||
@@ -184,8 +184,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimatedTexture_method_get_frame_duration:
|
||||
|
||||
@@ -233,10 +233,10 @@ void **set_frame_texture** **(** :ref:`int<class_int>` frame, :ref:`Texture2D<cl
|
||||
|
||||
最多可以定义 :ref:`MAX_FRAMES<class_AnimatedTexture_constant_MAX_FRAMES>` 个纹理,但要记住,只有 0 到 :ref:`frames<class_AnimatedTexture_property_frames>` - 1 的帧会成为动画的一部分。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
Animation
|
||||
=========
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
存放的是用于对引擎中的任何对象进行动画处理的数据。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
这个资源存放的是用于对引擎中的任何对象进行动画处理的数据。动画分为轨道,轨道必须与节点关联。向轨道添加定时关键帧(事件)后,节点的状态可以随时间变化。
|
||||
|
||||
@@ -52,15 +52,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`动画教程索引 <../tutorials/animation/index>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -75,8 +75,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -223,8 +223,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_Animation_TrackType:
|
||||
|
||||
@@ -500,8 +500,8 @@ enum **FindMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_Animation_property_length:
|
||||
|
||||
@@ -558,8 +558,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Animation_method_add_track:
|
||||
|
||||
@@ -877,7 +877,7 @@ void **compress** **(** :ref:`int<class_int>` page_size=8192, :ref:`int<class_in
|
||||
|
||||
void **copy_track** **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)**
|
||||
|
||||
添加一个新的轨道,这个轨道是给定轨道 ``to_animation`` 的副本。
|
||||
向 ``to_animation`` 添加一个新轨道,该轨道是该动画中给定轨道的副本。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1373,10 +1373,10 @@ void **value_track_set_update_mode** **(** :ref:`int<class_int>` track_idx, :ref
|
||||
|
||||
设置值轨道的更新模式(请参阅 :ref:`UpdateMode<enum_Animation_UpdateMode>`\ )。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,40 +10,28 @@
|
||||
AnimationLibrary
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`Animation<class_Animation>` 资源的容器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
动画库存储一组可通过 :ref:`StringName<class_StringName>` 键访问的动画,可用于 :ref:`AnimationPlayer<class_AnimationPlayer>` 节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`动画教程索引 <../tutorials/animation/index>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+-----------------------------------------------------+--------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_data<class_AnimationLibrary_property__data>` | ``{}`` |
|
||||
+-------------------------------------+-----------------------------------------------------+--------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -68,8 +56,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationLibrary_signal_animation_added:
|
||||
|
||||
@@ -123,27 +111,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AnimationLibrary_property__data:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`Dictionary<class_Dictionary>` **_data** = ``{}``
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationLibrary_method_add_animation:
|
||||
|
||||
@@ -213,10 +182,10 @@ void **rename_animation** **(** :ref:`StringName<class_StringName>` name, :ref:`
|
||||
|
||||
将与键 ``name`` 关联的 :ref:`Animation<class_Animation>` 的键更改为 ``newname``\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
809
classes/zh_CN/class_animationmixer.rst
Normal file
809
classes/zh_CN/class_animationmixer.rst
Normal file
@@ -0,0 +1,809 @@
|
||||
:github_url: hide
|
||||
|
||||
.. DO NOT EDIT THIS FILE!!!
|
||||
.. Generated automatically from Godot engine sources.
|
||||
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
||||
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationMixer.xml.
|
||||
|
||||
.. _class_AnimationMixer:
|
||||
|
||||
AnimationMixer
|
||||
==============
|
||||
|
||||
**继承:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**派生:** :ref:`AnimationPlayer<class_AnimationPlayer>`, :ref:`AnimationTree<class_AnimationTree>`
|
||||
|
||||
:ref:`AnimationPlayer<class_AnimationPlayer>` 和 :ref:`AnimationTree<class_AnimationTree>` 的基类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
描述
|
||||
----
|
||||
|
||||
:ref:`AnimationPlayer<class_AnimationPlayer>` 和 :ref:`AnimationTree<class_AnimationTree>` 的基类,用于管理动画列表。同时还提供了用于播放和混合的常用属性和方法。
|
||||
|
||||
在扩展后的类中实例化播放信息数据后,就会由 **AnimationMixer** 负责处理混合。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`active<class_AnimationMixer_property_active>` | ``true`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`int<class_int>` | :ref:`audio_max_polyphony<class_AnimationMixer_property_audio_max_polyphony>` | ``32`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` | :ref:`callback_mode_method<class_AnimationMixer_property_callback_mode_method>` | ``0`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` | :ref:`callback_mode_process<class_AnimationMixer_property_callback_mode_process>` | ``1`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`deterministic<class_AnimationMixer_property_deterministic>` | ``false`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`reset_on_save<class_AnimationMixer_property_reset_on_save>` | ``true`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` | ``NodePath("")`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`root_node<class_AnimationMixer_property_root_node>` | ``NodePath("..")`` |
|
||||
+---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`_post_process_key_value<class_AnimationMixer_private_method__post_process_key_value>` **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_animation_library<class_AnimationMixer_method_add_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)** |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`advance<class_AnimationMixer_method_advance>` **(** :ref:`float<class_float>` delta **)** |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_caches<class_AnimationMixer_method_clear_caches>` **(** **)** |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`find_animation<class_AnimationMixer_method_find_animation>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`find_animation_library<class_AnimationMixer_method_find_animation_library>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Animation<class_Animation>` | :ref:`get_animation<class_AnimationMixer_method_get_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationLibrary<class_AnimationLibrary>` | :ref:`get_animation_library<class_AnimationMixer_method_get_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName[]<class_StringName>` | :ref:`get_animation_library_list<class_AnimationMixer_method_get_animation_library_list>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_list<class_AnimationMixer_method_get_animation_list>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_position<class_AnimationMixer_method_get_root_motion_position>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_position_accumulator<class_AnimationMixer_method_get_root_motion_position_accumulator>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Quaternion<class_Quaternion>` | :ref:`get_root_motion_rotation<class_AnimationMixer_method_get_root_motion_rotation>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Quaternion<class_Quaternion>` | :ref:`get_root_motion_rotation_accumulator<class_AnimationMixer_method_get_root_motion_rotation_accumulator>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_scale<class_AnimationMixer_method_get_root_motion_scale>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_scale_accumulator<class_AnimationMixer_method_get_root_motion_scale_accumulator>` **(** **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationMixer_method_has_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_animation_library<class_AnimationMixer_method_has_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_animation_library<class_AnimationMixer_method_remove_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rename_animation_library<class_AnimationMixer_method_rename_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** |
|
||||
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_animation_finished:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_finished** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
|
||||
动画播放结束时通知。
|
||||
|
||||
\ **注意:**\ 如果动画正在循环播放,则不会发出此信号。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_animation_libraries_updated:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_libraries_updated** **(** **)**
|
||||
|
||||
当动画库发生更改时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_animation_list_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_list_changed** **(** **)**
|
||||
|
||||
当动画列表发生更改时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_animation_started:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_started** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
|
||||
当动画开始播放时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_caches_cleared:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**caches_cleared** **(** **)**
|
||||
|
||||
当缓存被清除时通知,可以是自动清除,也可以是通过 :ref:`clear_caches<class_AnimationMixer_method_clear_caches>` 手动清除。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_signal_mixer_updated:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**mixer_updated** **(** **)**
|
||||
|
||||
仅用于编辑器。当属性已完成更新进而更新动画播放编辑器中的虚拟 :ref:`AnimationPlayer<class_AnimationPlayer>` 时发出通知。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationMixer_AnimationCallbackModeProcess:
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
enum **AnimationCallbackModeProcess**:
|
||||
|
||||
.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` **ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS** = ``0``
|
||||
|
||||
在物理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`\ )。尤其适用于对物理体进行动画处理。
|
||||
|
||||
.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` **ANIMATION_CALLBACK_MODE_PROCESS_IDLE** = ``1``
|
||||
|
||||
在处理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`\ )。
|
||||
|
||||
.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` **ANIMATION_CALLBACK_MODE_PROCESS_MANUAL** = ``2``
|
||||
|
||||
不处理动画。使用\ :ref:`advance<class_AnimationMixer_method_advance>`\ 手动处理动画。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _enum_AnimationMixer_AnimationCallbackModeMethod:
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
enum **AnimationCallbackModeMethod**:
|
||||
|
||||
.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_DEFERRED:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` **ANIMATION_CALLBACK_MODE_METHOD_DEFERRED** = ``0``
|
||||
|
||||
在动画过程中批量调用方法,然后在处理完事件后再进行调用。这样就避免了在播放过程中涉及删除节点或修改AnimationPlayer的错误。
|
||||
|
||||
.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` **ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE** = ``1``
|
||||
|
||||
在动画中达到时立即进行方法调用。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationMixer_property_active:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **active** = ``true``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_active** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_active** **(** **)**
|
||||
|
||||
如果 ``true`` 时,\ **AnimationMixer** 将执行逻辑处理。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_audio_max_polyphony:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **audio_max_polyphony** = ``32``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_audio_max_polyphony** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_audio_max_polyphony** **(** **)**
|
||||
|
||||
每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。
|
||||
|
||||
例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>` 可以同时播放最多 ``32`` 个声音。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_callback_mode_method:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` **callback_mode_method** = ``0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_callback_mode_method** **(** :ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` value **)**
|
||||
- :ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>` **get_callback_mode_method** **(** **)**
|
||||
|
||||
方法调用轨道所使用的调用模式。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_callback_mode_process:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` **callback_mode_process** = ``1``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_callback_mode_process** **(** :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` value **)**
|
||||
- :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>` **get_callback_mode_process** **(** **)**
|
||||
|
||||
更新动画的过程通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_deterministic:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **deterministic** = ``false``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_deterministic** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_deterministic** **(** **)**
|
||||
|
||||
如果为 ``true``\ ,则混合使用确定性算法。总权重不进行归一化,在初始值的基础上进行累加(初始值为 ``0``\ ,表示可能存在的 ``"RESET"`` 动画)。
|
||||
|
||||
这意味着如果混合总权重为 ``0.0``\ ,则结果等于 ``"RESET"`` 动画。
|
||||
|
||||
如果混合动画之间的轨道数量不同,则缺少轨道的动画将被视为具有初始值。
|
||||
|
||||
如果为 ``false``\ ,则混合不会使用确定性算法。总权重将归一化且始终为 ``1.0``\ 。如果混合动画之间的轨道数量不同,则不会对缺少轨道的动画执行任何操作。
|
||||
|
||||
\ ** 注意:** 在 :ref:`AnimationTree<class_AnimationTree>` 中,与 :ref:`AnimationNodeAdd2<class_AnimationNodeAdd2>` 、 :ref:`AnimationNodeAdd3<class_AnimationNodeAdd3>` 、 :ref:`AnimationNodeSub2<class_AnimationNodeSub2>` 或权重大于 ``1.0`` 混合可能产生意想不到的结果。
|
||||
|
||||
例如,如果 :ref:`AnimationNodeAdd2<class_AnimationNodeAdd2>` 混合了两个取值为 ``1.0`` 的节点,则总权重为 ``2.0``\ ,但它将被归一化使总权重保持 ``1.0``\ ,且结果将等于取值为 ``0.5`` 的 :ref:`AnimationNodeBlend2<class_AnimationNodeBlend2>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_reset_on_save:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **reset_on_save** = ``true``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_reset_on_save_enabled** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_reset_on_save_enabled** **(** **)**
|
||||
|
||||
由编辑器使用。如果设置为 ``true``\ ,场景将被保存,并应用重置动画(带有键 ``"RESET"`` 的动画)的效果,就好像它已被定位到时间 0 一样,编辑器保留场景在保存之前的值。
|
||||
|
||||
这使得在编辑器中预览和编辑动画更加方便,因为对场景的更改,只要在重置动画中被设置,就不会被保存。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_root_motion_track:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`NodePath<class_NodePath>` **root_motion_track** = ``NodePath("")``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_root_motion_track** **(** :ref:`NodePath<class_NodePath>` value **)**
|
||||
- :ref:`NodePath<class_NodePath>` **get_root_motion_track** **(** **)**
|
||||
|
||||
用于根部运动的动画轨道的路径。路径必须是指向节点的场景树有效路径,必须从将实现动画的节点的父节点开始指定。要指定控件属性或骨骼的轨道,请在路径后附加其名称,用 ``":"`` 隔开。例如,\ ``"character/skeleton:ankle"`` 或 ``"character/mesh:transform/local"``\ 。
|
||||
|
||||
如果轨道的类型是 :ref:`Animation.TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`\ 、\ :ref:`Animation.TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>`\ 、或者 :ref:`Animation.TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>`\ ,那么将取消视觉上的变换,其动画看起来将是留在原地。参阅 :ref:`get_root_motion_position<class_AnimationMixer_method_get_root_motion_position>`\ 、\ :ref:`get_root_motion_rotation<class_AnimationMixer_method_get_root_motion_rotation>`\ 、\ :ref:`get_root_motion_scale<class_AnimationMixer_method_get_root_motion_scale>`\ 、和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_property_root_node:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`NodePath<class_NodePath>` **root_node** = ``NodePath("..")``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_root_node** **(** :ref:`NodePath<class_NodePath>` value **)**
|
||||
- :ref:`NodePath<class_NodePath>` **get_root_node** **(** **)**
|
||||
|
||||
节点路径引用将从其运行的节点。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationMixer_private_method__post_process_key_value:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **_post_process_key_value** **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const|
|
||||
|
||||
虚函数,用于播放期间在获取关键帧之后的处理。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_add_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Error<enum_@GlobalScope_Error>` **add_animation_library** **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)**
|
||||
|
||||
将 ``library`` 添加到该动画播放器的键 ``name`` 下。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_advance:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
|
||||
手动将动画前进指定的时间(单位为秒)。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_clear_caches:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **clear_caches** **(** **)**
|
||||
|
||||
**AnimationMixer** 会缓存动画节点。如果一个节点消失,它可能不会注意到;\ :ref:`clear_caches<class_AnimationMixer_method_clear_caches>` 能够强制它再次更新缓存。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_find_animation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **find_animation** **(** :ref:`Animation<class_Animation>` animation **)** |const|
|
||||
|
||||
返回 ``animation`` 的键;如果未找到,则返回一个空的 :ref:`StringName<class_StringName>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_find_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **find_animation_library** **(** :ref:`Animation<class_Animation>` animation **)** |const|
|
||||
|
||||
返回包含 ``animation`` 的 :ref:`AnimationLibrary<class_AnimationLibrary>` 的键;如果找不到,则返回一个空的 :ref:`StringName<class_StringName>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_animation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Animation<class_Animation>` **get_animation** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
返回带有键 ``name`` 的 :ref:`Animation<class_Animation>`\ 。如果动画不存在,则返回 ``null`` 并记录错误。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`AnimationLibrary<class_AnimationLibrary>` **get_animation_library** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
返回第一个键为 ``name`` 的 :ref:`AnimationLibrary<class_AnimationLibrary>`\ ,如果没有找到则返回 ``null``\ 。
|
||||
|
||||
要获得 :ref:`AnimationPlayer<class_AnimationPlayer>` 的全局动画库,请使用 ``get_animation_library("")``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_animation_library_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName[]<class_StringName>` **get_animation_library_list** **(** **)** |const|
|
||||
|
||||
返回存储库的键名列表。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_animation_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **get_animation_list** **(** **)** |const|
|
||||
|
||||
返回存储的动画键列表。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_position:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_position** **(** **)** |const|
|
||||
|
||||
将具有 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的位置的运动增量,检索为一个可以在其他地方使用的 :ref:`Vector3<class_Vector3>`\ 。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 不是 :ref:`Animation.TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>` 类型轨道的路径,则返回 ``Vector3(0, 0, 0)``\ 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的示例是将位置应用于 :ref:`CharacterBody3D<class_CharacterBody3D>`\ :
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var current_rotation: Quaternion
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_rotation = get_quaternion()
|
||||
state_machine.travel("Animate")
|
||||
var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta
|
||||
set_velocity(velocity)
|
||||
move_and_slide()
|
||||
|
||||
|
||||
|
||||
通过将其与 :ref:`get_root_motion_position_accumulator<class_AnimationMixer_method_get_root_motion_position_accumulator>` 结合使用,你可以更正确地应用根运动位置来考虑节点的旋转。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())
|
||||
var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta
|
||||
set_velocity(velocity)
|
||||
move_and_slide()
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_position_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_position_accumulator** **(** **)** |const|
|
||||
|
||||
检索具有 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的位置轨道的混合值,返回的是可以在其他地方使用的 :ref:`Vector3<class_Vector3>`\ 。
|
||||
|
||||
在想要遵循动画的初始动画帧值的情况下很有用。
|
||||
|
||||
例如,如果前一帧播放的是一个只有单个动画帧 ``Vector3(0, 0, 0)`` 的动画,然后下一帧播放的是一个只有单个动画帧\ ``Vector3(1, 0, 1)`` 的动画,它们之间的差异可以这样计算:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_position_accumulator: Vector3
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator()
|
||||
var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator
|
||||
prev_root_motion_position_accumulator = current_root_motion_position_accumulator
|
||||
transform.origin += difference
|
||||
|
||||
|
||||
|
||||
不过,如果动画是循环播放的,就可能会发生预料之外的不连续变化,所以这只对一些简单的情况有用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_rotation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Quaternion<class_Quaternion>` **get_root_motion_rotation** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的旋转运动,作为一个 :ref:`Quaternion<class_Quaternion>`\ ,可以在其他地方使用。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 不是 :ref:`Animation.TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` 类型的轨迹的路径,返回 ``Quaternion(0, 0, 0, 1)`` 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的例子是对 :ref:`CharacterBody3D<class_CharacterBody3D>` 应用旋转。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation() )
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_rotation_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Quaternion<class_Quaternion>` **get_root_motion_rotation_accumulator** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的旋转轨道的混合值,作为一个 :ref:`Quaternion<class_Quaternion>`\ ,可以在其他地方使用。
|
||||
|
||||
这里必须正确地结合根运动位置,并且要考虑到旋转。参考 :ref:`get_root_motion_position<class_AnimationMixer_method_get_root_motion_position>`\ 。
|
||||
|
||||
并且,当你想重视动画的初始动画帧的值时,这会很有用。
|
||||
|
||||
比如说,如果一个动画在上一帧只播放一个 ``Quaternion(0, 0, 0, 1)`` 动画帧,并且一个动画在下一帧只播放了一个动画帧的 ``Quaternion(0, 0.707, 0, 0.707)`` 时,它们相差的值可以这样求出:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_rotation_accumulator: Quaternion
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator()
|
||||
var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator
|
||||
prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator
|
||||
transform.basis *= difference
|
||||
|
||||
|
||||
|
||||
然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_scale:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_scale** **(** **)** |const|
|
||||
|
||||
获取 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的缩放运动增量,类型为 :ref:`Vector3<class_Vector3>`\ ,可以在其他地方使用。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 不是类型为 :ref:`Animation.TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` 的轨道的路径,则返回 ``Vector3(0, 0, 0)`` 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的例子是对 :ref:`CharacterBody3D<class_CharacterBody3D>` 应用缩放。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var current_scale: Vector3 = Vector3(1, 1, 1)
|
||||
var scale_accum: Vector3 = Vector3(1, 1, 1)
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_scale = get_scale()
|
||||
scale_accum = Vector3(1, 1, 1)
|
||||
state_machine.travel("Animate")
|
||||
scale_accum += animation_tree.get_root_motion_scale()
|
||||
set_scale(current_scale * scale_accum)
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_get_root_motion_scale_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_scale_accumulator** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationMixer_property_root_motion_track>` 的缩放轨道的混合值,作为一个 :ref:`Vector3<class_Vector3>`\ ,可以在其他地方使用。
|
||||
|
||||
例如,如果一个动画在前一帧只播放了一个动画帧 ``Vector3(1, 1, 1)``\ ,并且一个动画在后一帧只播放了一个动画帧 ``Vector3(2, 2, 2)``\ ,他们之间相差的值可以这样求出:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_scale_accumulator: Vector3
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator()
|
||||
var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator
|
||||
prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator
|
||||
transform.basis = transform.basis.scaled(difference)
|
||||
|
||||
|
||||
|
||||
然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_has_animation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **has_animation** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
如果该 :ref:`AnimationPlayer<class_AnimationPlayer>` 使用键 ``name`` 存储 :ref:`Animation<class_Animation>`\ ,则返回 ``true``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_has_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **has_animation_library** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
如果该 :ref:`AnimationPlayer<class_AnimationPlayer>` 使用键 ``name`` 存储 :ref:`AnimationLibrary<class_AnimationLibrary>`\ ,则返回 ``true``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_remove_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove_animation_library** **(** :ref:`StringName<class_StringName>` name **)**
|
||||
|
||||
移除与键 ``name`` 关联的 :ref:`AnimationLibrary<class_AnimationLibrary>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationMixer_method_rename_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **rename_animation_library** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)**
|
||||
|
||||
将与键 ``name`` 关联的 :ref:`AnimationLibrary<class_AnimationLibrary>` 移动到键 ``newname``\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
@@ -10,16 +10,16 @@
|
||||
AnimationNode
|
||||
=============
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AnimationNodeOutput<class_AnimationNodeOutput>`, :ref:`AnimationNodeSync<class_AnimationNodeSync>`, :ref:`AnimationNodeTimeScale<class_AnimationNodeTimeScale>`, :ref:`AnimationNodeTimeSeek<class_AnimationNodeTimeSeek>`, :ref:`AnimationRootNode<class_AnimationRootNode>`
|
||||
**派生:** :ref:`AnimationNodeOutput<class_AnimationNodeOutput>`, :ref:`AnimationNodeSync<class_AnimationNodeSync>`, :ref:`AnimationNodeTimeScale<class_AnimationNodeTimeScale>`, :ref:`AnimationNodeTimeSeek<class_AnimationNodeTimeSeek>`, :ref:`AnimationRootNode<class_AnimationRootNode>`
|
||||
|
||||
:ref:`AnimationTree<class_AnimationTree>` 节点的基类。与场景节点无关。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
:ref:`AnimationTree<class_AnimationTree>` 节点的基础资源。通常不会直接使用,但你可以使用自定义混合公式创建自定义节点。
|
||||
|
||||
@@ -27,15 +27,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -46,28 +46,28 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`_get_caption<class_AnimationNode_method__get_caption>` **(** **)** |virtual| |const| |
|
||||
| :ref:`String<class_String>` | :ref:`_get_caption<class_AnimationNode_private_method__get_caption>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`_get_child_by_name<class_AnimationNode_method__get_child_by_name>` **(** :ref:`StringName<class_StringName>` name **)** |virtual| |const| |
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`_get_child_by_name<class_AnimationNode_private_method__get_child_by_name>` **(** :ref:`StringName<class_StringName>` name **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_child_nodes<class_AnimationNode_method__get_child_nodes>` **(** **)** |virtual| |const| |
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_child_nodes<class_AnimationNode_private_method__get_child_nodes>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`_get_parameter_default_value<class_AnimationNode_method__get_parameter_default_value>` **(** :ref:`StringName<class_StringName>` parameter **)** |virtual| |const| |
|
||||
| :ref:`Variant<class_Variant>` | :ref:`_get_parameter_default_value<class_AnimationNode_private_method__get_parameter_default_value>` **(** :ref:`StringName<class_StringName>` parameter **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Array<class_Array>` | :ref:`_get_parameter_list<class_AnimationNode_method__get_parameter_list>` **(** **)** |virtual| |const| |
|
||||
| :ref:`Array<class_Array>` | :ref:`_get_parameter_list<class_AnimationNode_private_method__get_parameter_list>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_has_filter<class_AnimationNode_method__has_filter>` **(** **)** |virtual| |const| |
|
||||
| :ref:`bool<class_bool>` | :ref:`_has_filter<class_AnimationNode_private_method__has_filter>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_parameter_read_only<class_AnimationNode_method__is_parameter_read_only>` **(** :ref:`StringName<class_StringName>` parameter **)** |virtual| |const| |
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_parameter_read_only<class_AnimationNode_private_method__is_parameter_read_only>` **(** :ref:`StringName<class_StringName>` parameter **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_process<class_AnimationNode_method__process>` **(** :ref:`float<class_float>` time, :ref:`bool<class_bool>` seek, :ref:`bool<class_bool>` is_external_seeking, :ref:`bool<class_bool>` test_only **)** |virtual| |const| |
|
||||
| :ref:`float<class_float>` | :ref:`_process<class_AnimationNode_private_method__process>` **(** :ref:`float<class_float>` time, :ref:`bool<class_bool>` seek, :ref:`bool<class_bool>` is_external_seeking, :ref:`bool<class_bool>` test_only **)** |virtual| |const| |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`add_input<class_AnimationNode_method_add_input>` **(** :ref:`String<class_String>` name **)** |
|
||||
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -102,8 +102,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_signal_animation_node_removed:
|
||||
|
||||
@@ -143,8 +143,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNode_FilterAction:
|
||||
|
||||
@@ -190,8 +190,8 @@ enum **FilterAction**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNode_property_filter_enabled:
|
||||
|
||||
@@ -212,10 +212,10 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNode_method__get_caption:
|
||||
.. _class_AnimationNode_private_method__get_caption:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -227,7 +227,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__get_child_by_name:
|
||||
.. _class_AnimationNode_private_method__get_child_by_name:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -239,7 +239,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__get_child_nodes:
|
||||
.. _class_AnimationNode_private_method__get_child_nodes:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -251,7 +251,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__get_parameter_default_value:
|
||||
.. _class_AnimationNode_private_method__get_parameter_default_value:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -263,7 +263,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__get_parameter_list:
|
||||
.. _class_AnimationNode_private_method__get_parameter_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -275,7 +275,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__has_filter:
|
||||
.. _class_AnimationNode_private_method__has_filter:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -287,7 +287,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__is_parameter_read_only:
|
||||
.. _class_AnimationNode_private_method__is_parameter_read_only:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -299,7 +299,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationNode_method__process:
|
||||
.. _class_AnimationNode_private_method__process:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -469,10 +469,10 @@ void **set_parameter** **(** :ref:`StringName<class_StringName>` name, :ref:`Var
|
||||
|
||||
设置一个自定义参数。这些参数被用作本地内存,因为资源可以在树或场景中重复使用。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeAdd2
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中加法地混合两个动画。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。根据取值将两个动画加法混合在一起。
|
||||
|
||||
@@ -27,15 +27,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeAdd3
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中将三个动画中的两个动画相加。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。根据取值将三个动画中的两个进行加法混合。
|
||||
|
||||
@@ -33,17 +33,17 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
- `第三人称射击演示 <https://godotengine.org/asset-library/asset/678>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AnimationNodeAnimation
|
||||
======================
|
||||
|
||||
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的输入动画。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一种添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。只有一个输出端口,使用的是 :ref:`animation<class_AnimationNodeAnimation_property_animation>` 属性。可用作 :ref:`AnimationNode<class_AnimationNode>` 的输入,将动画混合在一起。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -34,8 +34,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -52,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeAnimation_PlayMode:
|
||||
|
||||
@@ -83,8 +83,8 @@ enum **PlayMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeAnimation_property_animation:
|
||||
|
||||
@@ -116,10 +116,10 @@ Property Descriptions
|
||||
|
||||
确定动画的播放方向。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeBlend2
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中将两个动画进行线性混合。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。根据取值将两个动画进行线性混合。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -34,10 +34,10 @@ Tutorials
|
||||
|
||||
- `第三人称射击演示 <https://godotengine.org/asset-library/asset/678>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeBlend3
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中将三个动画中的两个进行线性混合。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。根据取值将三个动画中的两个进行线性混合。
|
||||
|
||||
@@ -33,15 +33,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeBlendSpace1D
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
一组放置在一个虚拟轴上的 :ref:`AnimationRootNode<class_AnimationRootNode>`\ ,在两个相邻节点之间交叉淡化。被 :ref:`AnimationTree<class_AnimationTree>` 使用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。
|
||||
|
||||
@@ -27,15 +27,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -56,8 +56,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -84,8 +84,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeBlendSpace1D_BlendMode:
|
||||
|
||||
@@ -123,8 +123,8 @@ enum **BlendMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendSpace1D_property_blend_mode:
|
||||
|
||||
@@ -232,8 +232,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendSpace1D_method_add_blend_point:
|
||||
|
||||
@@ -315,10 +315,10 @@ void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`float
|
||||
|
||||
更新混合轴上索引 ``point`` 处的点的位置。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeBlendSpace2D
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
一组放置在 2D 坐标上的 :ref:`AnimationRootNode<class_AnimationRootNode>`\ ,在三个相邻节点之间交叉淡化。被 :ref:`AnimationTree<class_AnimationTree>` 使用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
:ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 使用的资源。
|
||||
|
||||
@@ -27,8 +27,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -36,8 +36,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -62,8 +62,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -98,8 +98,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeBlendSpace2D_signal_triangles_updated:
|
||||
|
||||
@@ -115,8 +115,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeBlendSpace2D_BlendMode:
|
||||
|
||||
@@ -154,8 +154,8 @@ enum **BlendMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendSpace2D_property_auto_triangles:
|
||||
|
||||
@@ -297,8 +297,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendSpace2D_method_add_blend_point:
|
||||
|
||||
@@ -428,10 +428,10 @@ void **set_blend_point_position** **(** :ref:`int<class_int>` point, :ref:`Vecto
|
||||
|
||||
更新混合轴上索引 ``point`` 处的点的位置。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeBlendTree
|
||||
======================
|
||||
|
||||
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于复杂动画的许多类型 :ref:`AnimationNode<class_AnimationNode>` 的子树。由 :ref:`AnimationTree<class_AnimationTree>` 使用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
这个动画节点可以包含任何其他类型动画节点的子树,例如 :ref:`AnimationNodeTransition<class_AnimationNodeTransition>`\ 、\ :ref:`AnimationNodeBlend2<class_AnimationNodeBlend2>`\ 、\ :ref:`AnimationNodeBlend3<class_AnimationNodeBlend3>`\ 、\ :ref:`AnimationNodeOneShot<class_AnimationNodeOneShot>` 等。这是最常用的动画节点根之一。
|
||||
|
||||
@@ -25,15 +25,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -44,8 +44,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -76,8 +76,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeBlendTree_signal_node_changed:
|
||||
|
||||
@@ -93,8 +93,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constants
|
||||
---------
|
||||
常量
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeBlendTree_constant_CONNECTION_OK:
|
||||
|
||||
@@ -150,8 +150,8 @@ Constants
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendTree_property_graph_offset:
|
||||
|
||||
@@ -172,8 +172,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeBlendTree_method_add_node:
|
||||
|
||||
@@ -279,10 +279,10 @@ void **set_node_position** **(** :ref:`StringName<class_StringName>` name, :ref:
|
||||
|
||||
修改子动画节点的位置。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeOneShot
|
||||
====================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中播放一次动画。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。这个动画节点将执行子动画并在完成后返回。可以自定义淡入和淡出的混合时间以及过滤器。
|
||||
|
||||
@@ -74,8 +74,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -83,8 +83,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -113,8 +113,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeOneShot_OneShotRequest:
|
||||
|
||||
@@ -186,8 +186,8 @@ enum **MixMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeOneShot_property_autorestart:
|
||||
|
||||
@@ -323,10 +323,10 @@ Property Descriptions
|
||||
|
||||
混合类型。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AnimationNodeOutput
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的动画输出节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
在输出最终动画的 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中自动创建的节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -32,10 +32,10 @@ Tutorials
|
||||
|
||||
- `第三人称射击演示 <https://godotengine.org/asset-library/asset/678>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeStateMachine
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
带有多个 :ref:`AnimationRootNode<class_AnimationRootNode>` 的状态机,用于 :ref:`AnimationTree<class_AnimationTree>`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
包含表示动画状态的多个 :ref:`AnimationRootNode<class_AnimationRootNode>`\ ,以图的形式连接。可以使用最短路径算法,将节点过渡配置为自动发生或通过代码发生。要以编程的方式控制过渡,请从 :ref:`AnimationTree<class_AnimationTree>` 节点获取 :ref:`AnimationNodeStateMachinePlayback<class_AnimationNodeStateMachinePlayback>` 对象。
|
||||
|
||||
@@ -40,15 +40,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -63,8 +63,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -115,8 +115,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeStateMachine_StateMachineType:
|
||||
|
||||
@@ -154,8 +154,8 @@ enum **StateMachineType**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeStateMachine_property_allow_transition_to_self:
|
||||
|
||||
@@ -212,8 +212,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeStateMachine_method_add_node:
|
||||
|
||||
@@ -415,7 +415,7 @@ void **replace_node** **(** :ref:`StringName<class_StringName>` name, :ref:`Anim
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -441,10 +441,10 @@ void **set_node_position** **(** :ref:`StringName<class_StringName>` name, :ref:
|
||||
|
||||
设置动画节点的坐标。用于在编辑器中显示。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeStateMachinePlayback
|
||||
=================================
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为 :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` 提供播放控制。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
允许控制使用 :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` 创建的 :ref:`AnimationTree<class_AnimationTree>` 状态机。使用 ``$AnimationTree.get("parameters/playback")`` 检索。
|
||||
|
||||
@@ -40,15 +40,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -59,8 +59,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -93,8 +93,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeStateMachinePlayback_method_get_current_length:
|
||||
|
||||
@@ -222,10 +222,10 @@ void **travel** **(** :ref:`StringName<class_StringName>` to_node, :ref:`bool<cl
|
||||
|
||||
如果 ``reset_on_teleport`` 为 ``true``\ ,当行进导致传送时,该动画将从头开始播放。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeStateMachineTransition
|
||||
===================================
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` 中连接两个 :ref:`AnimationRootNode<class_AnimationRootNode>` 的过渡。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
使用 :ref:`AnimationNodeStateMachinePlayback.travel<class_AnimationNodeStateMachinePlayback_method_travel>` 时生成的路径,仅限于通过 **AnimationNodeStateMachineTransition** 连接的节点。
|
||||
|
||||
@@ -25,15 +25,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -62,8 +62,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed:
|
||||
|
||||
@@ -79,8 +79,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationNodeStateMachineTransition_SwitchMode:
|
||||
|
||||
@@ -152,8 +152,8 @@ enum **AdvanceMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeStateMachineTransition_property_advance_condition:
|
||||
|
||||
@@ -300,10 +300,10 @@ Property Descriptions
|
||||
|
||||
这个状态和下一个状态之间的交叉渐变时间。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeSub2
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中对两个动画进行减法混合。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
要添加到 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的资源。根据数量值以减法方式混合两个动画。
|
||||
|
||||
@@ -29,15 +29,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
AnimationNodeSync
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AnimationNodeAdd2<class_AnimationNodeAdd2>`, :ref:`AnimationNodeAdd3<class_AnimationNodeAdd3>`, :ref:`AnimationNodeBlend2<class_AnimationNodeBlend2>`, :ref:`AnimationNodeBlend3<class_AnimationNodeBlend3>`, :ref:`AnimationNodeOneShot<class_AnimationNodeOneShot>`, :ref:`AnimationNodeSub2<class_AnimationNodeSub2>`, :ref:`AnimationNodeTransition<class_AnimationNodeTransition>`
|
||||
**派生:** :ref:`AnimationNodeAdd2<class_AnimationNodeAdd2>`, :ref:`AnimationNodeAdd3<class_AnimationNodeAdd3>`, :ref:`AnimationNodeBlend2<class_AnimationNodeBlend2>`, :ref:`AnimationNodeBlend3<class_AnimationNodeBlend3>`, :ref:`AnimationNodeOneShot<class_AnimationNodeOneShot>`, :ref:`AnimationNodeSub2<class_AnimationNodeSub2>`, :ref:`AnimationNodeTransition<class_AnimationNodeTransition>`
|
||||
|
||||
带有两个以上输入端口的 :ref:`AnimationNode<class_AnimationNode>` 基类,必须对这两个端口进行同步。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一种动画节点,用于将两个或多个动画组合、混合、或混合在一起,同时使它们在 :ref:`AnimationTree<class_AnimationTree>` 中保持同步。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -48,8 +48,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeSync_property_sync:
|
||||
|
||||
@@ -66,10 +66,10 @@ Property Descriptions
|
||||
|
||||
如果为 ``true``\ ,则强制混合动画以前进帧。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
AnimationNodeTimeScale
|
||||
======================
|
||||
|
||||
**Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
对时间进行缩放的动画节点,在 :ref:`AnimationTree<class_AnimationTree>` 中使用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
允许缩放任何子节点中动画的速度(或反转)。将其设置为 ``0.0`` 将暂停动画。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
- `3D 平台跳跃演示 <https://godotengine.org/asset-library/asset/125>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeTimeSeek
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
对时间进行检索的动画节点,在 :ref:`AnimationTree<class_AnimationTree>` 中使用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
这个动画节点可用于使检索命令发生在动画图的任何次级子节点上。用于从 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 的开头或某个特定播放位置开始播放 :ref:`Animation<class_Animation>`\ 。
|
||||
|
||||
@@ -50,15 +50,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationNodeTransition
|
||||
=======================
|
||||
|
||||
**Inherits:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNodeSync<class_AnimationNodeSync>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`AnimationTree<class_AnimationTree>` 中连接两个 :ref:`AnimationNode<class_AnimationNode>` 的过渡。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
适用于不需要更高级 :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` 的情况的简单状态机。可以将动画连接到输入,还可以指定过渡时间。
|
||||
|
||||
@@ -60,8 +60,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -71,8 +71,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -89,8 +89,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -111,8 +111,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeTransition_property_allow_transition_to_self:
|
||||
|
||||
@@ -184,8 +184,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationNodeTransition_method_is_input_reset:
|
||||
|
||||
@@ -231,10 +231,10 @@ void **set_input_reset** **(** :ref:`int<class_int>` input, :ref:`bool<class_boo
|
||||
|
||||
如果为 ``true``\ ,则目标动画在动画过渡时重新启动。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationPlayer
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationMixer<class_AnimationMixer>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于播放动画的节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
动画播放器用于动画的通用播放。它包含 :ref:`AnimationLibrary<class_AnimationLibrary>` 资源的字典和动画过渡之间的自定义混合时间。
|
||||
|
||||
@@ -29,8 +29,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`2D 精灵动画 <../tutorials/2d/2d_sprite_animation>`
|
||||
|
||||
@@ -40,107 +40,79 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`String<class_String>` | :ref:`assigned_animation<class_AnimationPlayer_property_assigned_animation>` | |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`int<class_int>` | :ref:`audio_max_polyphony<class_AnimationPlayer_property_audio_max_polyphony>` | ``32`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`String<class_String>` | :ref:`autoplay<class_AnimationPlayer_property_autoplay>` | ``""`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`String<class_String>` | :ref:`current_animation<class_AnimationPlayer_property_current_animation>` | ``""`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`float<class_float>` | :ref:`current_animation_length<class_AnimationPlayer_property_current_animation_length>` | |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`float<class_float>` | :ref:`current_animation_position<class_AnimationPlayer_property_current_animation_position>` | |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` | :ref:`method_call_mode<class_AnimationPlayer_property_method_call_mode>` | ``0`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`movie_quit_on_finish<class_AnimationPlayer_property_movie_quit_on_finish>` | ``false`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`playback_active<class_AnimationPlayer_property_playback_active>` | |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`float<class_float>` | :ref:`playback_default_blend_time<class_AnimationPlayer_property_playback_default_blend_time>` | ``0.0`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` | :ref:`playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` | ``1`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`reset_on_save<class_AnimationPlayer_property_reset_on_save>` | ``true`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`root_node<class_AnimationPlayer_property_root_node>` | ``NodePath("..")`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
| :ref:`float<class_float>` | :ref:`speed_scale<class_AnimationPlayer_property_speed_scale>` | ``1.0`` |
|
||||
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`assigned_animation<class_AnimationPlayer_property_assigned_animation>` | |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`autoplay<class_AnimationPlayer_property_autoplay>` | ``""`` |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`String<class_String>` | :ref:`current_animation<class_AnimationPlayer_property_current_animation>` | ``""`` |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`current_animation_length<class_AnimationPlayer_property_current_animation_length>` | |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`current_animation_position<class_AnimationPlayer_property_current_animation_position>` | |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`bool<class_bool>` | :ref:`movie_quit_on_finish<class_AnimationPlayer_property_movie_quit_on_finish>` | ``false`` |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`playback_default_blend_time<class_AnimationPlayer_property_playback_default_blend_time>` | ``0.0`` |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`float<class_float>` | :ref:`speed_scale<class_AnimationPlayer_property_speed_scale>` | ``1.0`` |
|
||||
+-----------------------------+------------------------------------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`_post_process_key_value<class_AnimationPlayer_method__post_process_key_value>` **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_animation_library<class_AnimationPlayer_method_add_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`advance<class_AnimationPlayer_method_advance>` **(** :ref:`float<class_float>` delta **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`animation_get_next<class_AnimationPlayer_method_animation_get_next>` **(** :ref:`StringName<class_StringName>` anim_from **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`animation_set_next<class_AnimationPlayer_method_animation_set_next>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_caches<class_AnimationPlayer_method_clear_caches>` **(** **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_queue<class_AnimationPlayer_method_clear_queue>` **(** **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`find_animation<class_AnimationPlayer_method_find_animation>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`find_animation_library<class_AnimationPlayer_method_find_animation_library>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Animation<class_Animation>` | :ref:`get_animation<class_AnimationPlayer_method_get_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationLibrary<class_AnimationLibrary>` | :ref:`get_animation_library<class_AnimationPlayer_method_get_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName[]<class_StringName>` | :ref:`get_animation_library_list<class_AnimationPlayer_method_get_animation_library_list>` **(** **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_list<class_AnimationPlayer_method_get_animation_list>` **(** **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_blend_time<class_AnimationPlayer_method_get_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_playing_speed<class_AnimationPlayer_method_get_playing_speed>` **(** **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_queue<class_AnimationPlayer_method_get_queue>` **(** **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationPlayer_method_has_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`has_animation_library<class_AnimationPlayer_method_has_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationPlayer_method_is_playing>` **(** **)** |const| |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`pause<class_AnimationPlayer_method_pause>` **(** **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play<class_AnimationPlayer_method_play>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1, :ref:`float<class_float>` custom_speed=1.0, :ref:`bool<class_bool>` from_end=false **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1 **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`queue<class_AnimationPlayer_method_queue>` **(** :ref:`StringName<class_StringName>` name **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_animation_library<class_AnimationPlayer_method_remove_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rename_animation_library<class_AnimationPlayer_method_rename_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek<class_AnimationPlayer_method_seek>` **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_blend_time<class_AnimationPlayer_method_set_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to, :ref:`float<class_float>` sec **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_AnimationPlayer_method_stop>` **(** :ref:`bool<class_bool>` keep_state=false **)** |
|
||||
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`StringName<class_StringName>` | :ref:`animation_get_next<class_AnimationPlayer_method_animation_get_next>` **(** :ref:`StringName<class_StringName>` animation_from **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`animation_set_next<class_AnimationPlayer_method_animation_set_next>` **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_queue<class_AnimationPlayer_method_clear_queue>` **(** **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_blend_time<class_AnimationPlayer_method_get_blend_time>` **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` | :ref:`get_method_call_mode<class_AnimationPlayer_method_get_method_call_mode>` **(** **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_playing_speed<class_AnimationPlayer_method_get_playing_speed>` **(** **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` | :ref:`get_process_callback<class_AnimationPlayer_method_get_process_callback>` **(** **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_queue<class_AnimationPlayer_method_get_queue>` **(** **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`get_root<class_AnimationPlayer_method_get_root>` **(** **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationPlayer_method_is_playing>` **(** **)** |const| |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`pause<class_AnimationPlayer_method_pause>` **(** **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play<class_AnimationPlayer_method_play>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1, :ref:`float<class_float>` custom_speed=1.0, :ref:`bool<class_bool>` from_end=false **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1 **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`queue<class_AnimationPlayer_method_queue>` **(** :ref:`StringName<class_StringName>` name **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`seek<class_AnimationPlayer_method_seek>` **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false, :ref:`bool<class_bool>` update_only=false **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_blend_time<class_AnimationPlayer_method_set_blend_time>` **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to, :ref:`float<class_float>` sec **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_method_call_mode<class_AnimationPlayer_method_set_method_call_mode>` **(** :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` mode **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_process_callback<class_AnimationPlayer_method_set_process_callback>` **(** :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` mode **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_root<class_AnimationPlayer_method_set_root>` **(** :ref:`NodePath<class_NodePath>` path **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`stop<class_AnimationPlayer_method_stop>` **(** :ref:`bool<class_bool>` keep_state=false **)** |
|
||||
+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -148,8 +120,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_animation_changed:
|
||||
|
||||
@@ -157,7 +129,7 @@ Signals
|
||||
|
||||
**animation_changed** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` new_name **)**
|
||||
|
||||
在前一个动画完成后,播放队列中的动画时发出。请参阅 :ref:`queue<class_AnimationPlayer_method_queue>`\ 。
|
||||
在前一个动画完成后,队列中的动画播放时发出。另见 :ref:`queue<class_AnimationPlayer_method_queue>`\ 。
|
||||
|
||||
\ **注意:**\ 通过 :ref:`play<class_AnimationPlayer_method_play>` 或 :ref:`AnimationTree<class_AnimationTree>` 改变动画时,不会发出此信号。
|
||||
|
||||
@@ -165,63 +137,13 @@ Signals
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_animation_finished:
|
||||
.. _class_AnimationPlayer_signal_current_animation_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_finished** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
**current_animation_changed** **(** :ref:`String<class_String>` name **)**
|
||||
|
||||
动画播放结束时通知。
|
||||
|
||||
\ **注意:**\ 如果动画正在循环播放,则不会发出此信号。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_animation_libraries_updated:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_libraries_updated** **(** **)**
|
||||
|
||||
当动画库发生更改时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_animation_list_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_list_changed** **(** **)**
|
||||
|
||||
当动画列表发生更改时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_animation_started:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_started** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
|
||||
当动画开始播放时发出通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_signal_caches_cleared:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**caches_cleared** **(** **)**
|
||||
|
||||
当缓存被清除时通知,可以是自动清除,也可以是通过 :ref:`clear_caches<class_AnimationPlayer_method_clear_caches>` 手动清除。
|
||||
当 :ref:`current_animation<class_AnimationPlayer_property_current_animation>` 更改时发出。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -229,8 +151,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationPlayer_AnimationProcessCallback:
|
||||
|
||||
@@ -244,7 +166,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **ANIMATION_PROCESS_PHYSICS** = ``0``
|
||||
|
||||
在物理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`\ )。尤其适用于对物理体进行动画处理。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`\ 。
|
||||
|
||||
.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_IDLE:
|
||||
|
||||
@@ -252,7 +174,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **ANIMATION_PROCESS_IDLE** = ``1``
|
||||
|
||||
在处理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`\ )。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE>`\ 。
|
||||
|
||||
.. _class_AnimationPlayer_constant_ANIMATION_PROCESS_MANUAL:
|
||||
|
||||
@@ -260,7 +182,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **ANIMATION_PROCESS_MANUAL** = ``2``
|
||||
|
||||
不处理动画。使用\ :ref:`advance<class_AnimationPlayer_method_advance>`\ 手动处理动画。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -278,7 +200,7 @@ enum **AnimationMethodCallMode**:
|
||||
|
||||
:ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` **ANIMATION_METHOD_CALL_DEFERRED** = ``0``
|
||||
|
||||
在动画过程中批量调用方法,然后在处理完事件后再进行调用。这样就避免了在播放过程中涉及删除节点或修改AnimationPlayer的错误。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_DEFERRED>`\ 。
|
||||
|
||||
.. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_IMMEDIATE:
|
||||
|
||||
@@ -286,7 +208,7 @@ enum **AnimationMethodCallMode**:
|
||||
|
||||
:ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` **ANIMATION_METHOD_CALL_IMMEDIATE** = ``1``
|
||||
|
||||
在动画中达到时立即进行方法调用。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE>`\ 。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -294,8 +216,8 @@ enum **AnimationMethodCallMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationPlayer_property_assigned_animation:
|
||||
|
||||
@@ -314,25 +236,6 @@ Property Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_audio_max_polyphony:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **audio_max_polyphony** = ``32``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_audio_max_polyphony** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_audio_max_polyphony** **(** **)**
|
||||
|
||||
每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。
|
||||
|
||||
例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>` 可以同时播放最多 ``32`` 个声音。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_autoplay:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -401,23 +304,6 @@ Property Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_method_call_mode:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` **method_call_mode** = ``0``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_method_call_mode** **(** :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` value **)**
|
||||
- :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` **get_method_call_mode** **(** **)**
|
||||
|
||||
方法调用轨道所使用的调用模式。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_movie_quit_on_finish:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -429,26 +315,9 @@ Property Descriptions
|
||||
- void **set_movie_quit_on_finish_enabled** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_movie_quit_on_finish_enabled** **(** **)**
|
||||
|
||||
如果为 ``true``\ ,并且引擎在 Movie Maker 模式下运行(请参阅 :ref:`MovieWriter<class_MovieWriter>`\ ),则在此 **AnimationPlayer** 中播放完动画后,立即使用 :ref:`SceneTree.quit<class_SceneTree_method_quit>` 退出引擎。当引擎因此而退出时,会打印一条消息。
|
||||
如果为 ``true``\ ,并且引擎在 Movie Maker 模式下运行(见 :ref:`MovieWriter<class_MovieWriter>`\ ),则会在此 **AnimationPlayer** 中播放完动画后,立即使用 :ref:`SceneTree.quit<class_SceneTree_method_quit>` 退出引擎。当引擎因此而退出时,会打印一条消息。
|
||||
|
||||
\ **注意:**\ 这与 :ref:`animation_finished<class_AnimationPlayer_signal_animation_finished>` 信号遵循相同的逻辑,因此如果动画被设置为循环,它不会退出引擎。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_playback_active:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **playback_active**
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_active** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_active** **(** **)**
|
||||
|
||||
如果为 ``true``\ ,根据流程相关通知更新动画。
|
||||
\ **注意:**\ 这与 :ref:`AnimationMixer.animation_finished<class_AnimationMixer_signal_animation_finished>` 信号遵循相同的逻辑,因此如果动画被设置为循环,它不会退出引擎。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -471,59 +340,6 @@ Property Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_playback_process_mode:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **playback_process_mode** = ``1``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_process_callback** **(** :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` value **)**
|
||||
- :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **get_process_callback** **(** **)**
|
||||
|
||||
更新动画的过程通知。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_reset_on_save:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **reset_on_save** = ``true``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_reset_on_save_enabled** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_reset_on_save_enabled** **(** **)**
|
||||
|
||||
由编辑器使用。如果设置为 ``true``\ ,场景将被保存,并应用重置动画(带有键 ``"RESET"`` 的动画)的效果,就好像它已被定位到时间 0 一样,编辑器保留场景在保存之前的值。
|
||||
|
||||
这使得在编辑器中预览和编辑动画更加方便,因为对场景的更改,只要在重置动画中被设置,就不会被保存。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_root_node:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`NodePath<class_NodePath>` **root_node** = ``NodePath("..")``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_root** **(** :ref:`NodePath<class_NodePath>` value **)**
|
||||
- :ref:`NodePath<class_NodePath>` **get_root** **(** **)**
|
||||
|
||||
节点路径引用将从其运行的节点。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_property_speed_scale:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -545,52 +361,16 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_AnimationPlayer_method__post_process_key_value:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **_post_process_key_value** **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const|
|
||||
|
||||
一个用于播放期间键获取之后的处理的虚函数。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_add_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Error<enum_@GlobalScope_Error>` **add_animation_library** **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)**
|
||||
|
||||
将 ``library`` 添加到该动画播放器的键 ``name`` 下。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_advance:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
|
||||
移动动画时间轴上的位置并立即更新动画。\ ``delta`` 是要移动的时间,单位为秒。会处理位于当前帧和 ``delta`` 之间的事件。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationPlayer_method_animation_get_next:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **animation_get_next** **(** :ref:`StringName<class_StringName>` anim_from **)** |const|
|
||||
:ref:`StringName<class_StringName>` **animation_get_next** **(** :ref:`StringName<class_StringName>` animation_from **)** |const|
|
||||
|
||||
返回在 ``anim_from`` 动画之后排队播放的动画的键。
|
||||
返回在 ``animation_from`` 动画之后排队播放的动画的键。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -600,21 +380,9 @@ void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **animation_set_next** **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)**
|
||||
void **animation_set_next** **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to **)**
|
||||
|
||||
当 ``anim_from`` 动画完成时,触发 ``anim_to`` 动画。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_clear_caches:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **clear_caches** **(** **)**
|
||||
|
||||
**AnimationPlayer** 缓存动画节点。如果一个节点消失,它可能不会注意到;\ :ref:`clear_caches<class_AnimationPlayer_method_clear_caches>` 强制它再次更新缓存。
|
||||
当 ``animation_from`` 动画完成时,触发 ``animation_to`` 动画。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -632,85 +400,11 @@ void **clear_queue** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_find_animation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **find_animation** **(** :ref:`Animation<class_Animation>` animation **)** |const|
|
||||
|
||||
返回 ``animation`` 的键;如果未找到,则返回一个空的 :ref:`StringName<class_StringName>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_find_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName<class_StringName>` **find_animation_library** **(** :ref:`Animation<class_Animation>` animation **)** |const|
|
||||
|
||||
返回包含 ``animation`` 的 :ref:`AnimationLibrary<class_AnimationLibrary>` 的键;如果找不到,则返回一个空的 :ref:`StringName<class_StringName>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_animation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Animation<class_Animation>` **get_animation** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
返回带有键 ``name`` 的 :ref:`Animation<class_Animation>`\ 。如果动画不存在,则返回 ``null`` 并记录错误。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`AnimationLibrary<class_AnimationLibrary>` **get_animation_library** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
返回第一个键为 ``name`` 的 :ref:`AnimationLibrary<class_AnimationLibrary>`\ ,如果没有找到则返回 ``null``\ 。
|
||||
|
||||
要获得 **AnimationPlayer** 的全局动画库,请使用 ``get_animation_library("")``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_animation_library_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`StringName[]<class_StringName>` **get_animation_library_list** **(** **)** |const|
|
||||
|
||||
返回存储库的键名列表。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_animation_list:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedStringArray<class_PackedStringArray>` **get_animation_list** **(** **)** |const|
|
||||
|
||||
返回存储的动画键列表。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_blend_time:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **get_blend_time** **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |const|
|
||||
:ref:`float<class_float>` **get_blend_time** **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to **)** |const|
|
||||
|
||||
返回两个动画之间的混合时间(以秒为单位),由它们的键引用。
|
||||
|
||||
@@ -718,6 +412,18 @@ void **clear_queue** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_method_call_mode:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` **get_method_call_mode** **(** **)** |const|
|
||||
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_playing_speed:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -732,6 +438,18 @@ void **clear_queue** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_process_callback:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` **get_process_callback** **(** **)** |const|
|
||||
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_get_queue:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -744,25 +462,13 @@ void **clear_queue** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_has_animation:
|
||||
.. _class_AnimationPlayer_method_get_root:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **has_animation** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
:ref:`NodePath<class_NodePath>` **get_root** **(** **)** |const|
|
||||
|
||||
如果该 **AnimationPlayer** 使用键 ``name`` 存储 :ref:`Animation<class_Animation>`\ ,则返回 ``true``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_has_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **has_animation_library** **(** :ref:`StringName<class_StringName>` name **)** |const|
|
||||
|
||||
如果该 **AnimationPlayer** 使用键 ``name`` 存储 :ref:`AnimationLibrary<class_AnimationLibrary>`\ ,则返回 ``true``\ 。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.root_node<class_AnimationMixer_property_root_node>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -840,39 +546,17 @@ void **queue** **(** :ref:`StringName<class_StringName>` name **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_remove_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **remove_animation_library** **(** :ref:`StringName<class_StringName>` name **)**
|
||||
|
||||
移除与键 ``name`` 关联的 :ref:`AnimationLibrary<class_AnimationLibrary>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_rename_animation_library:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **rename_animation_library** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)**
|
||||
|
||||
将与键 ``name`` 关联的 :ref:`AnimationLibrary<class_AnimationLibrary>` 移动到键 ``newname``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_seek:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **seek** **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false **)**
|
||||
void **seek** **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false, :ref:`bool<class_bool>` update_only=false **)**
|
||||
|
||||
将动画寻道到时间点 ``seconds``\ (单位为秒)。\ ``update`` 为 ``true`` 时会同时更新动画,否则会在处理时更新。当前帧和 ``seconds`` 之间的事件会被跳过。
|
||||
|
||||
\ **注意:**\ 寻道至动画的末尾不会触发 :ref:`animation_finished<class_AnimationPlayer_signal_animation_finished>`\ 。如果想要跳过动画并触发该信号,请使用 :ref:`advance<class_AnimationPlayer_method_advance>`\ 。
|
||||
如果 ``update_only`` 为 true,则不会处理方法轨道、音频轨道、动画播放轨道。
|
||||
|
||||
\ **注意:**\ 寻道至动画的末尾不会触发 :ref:`AnimationMixer.animation_finished<class_AnimationMixer_signal_animation_finished>`\ 。如果想要跳过动画并触发该信号,请使用 :ref:`AnimationMixer.advance<class_AnimationMixer_method_advance>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -882,7 +566,7 @@ void **seek** **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` u
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_blend_time** **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to, :ref:`float<class_float>` sec **)**
|
||||
void **set_blend_time** **(** :ref:`StringName<class_StringName>` animation_from, :ref:`StringName<class_StringName>` animation_to, :ref:`float<class_float>` sec **)**
|
||||
|
||||
指定两个动画(由它们的键所引用)之间的混合时间(以秒为单位)。
|
||||
|
||||
@@ -890,6 +574,42 @@ void **set_blend_time** **(** :ref:`StringName<class_StringName>` anim_from, :re
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_set_method_call_mode:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_method_call_mode** **(** :ref:`AnimationMethodCallMode<enum_AnimationPlayer_AnimationMethodCallMode>` mode **)**
|
||||
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeMethod<enum_AnimationMixer_AnimationCallbackModeMethod>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_set_process_callback:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_process_callback** **(** :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` mode **)**
|
||||
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_set_root:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_root** **(** :ref:`NodePath<class_NodePath>` path **)**
|
||||
|
||||
用于向后兼容。见 :ref:`AnimationMixer.root_node<class_AnimationMixer_property_root_node>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationPlayer_method_stop:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -902,10 +622,10 @@ void **stop** **(** :ref:`bool<class_bool>` keep_state=false **)**
|
||||
|
||||
\ **注意:**\ 方法/音频/动画播放轨道不会被该方法处理。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
AnimationRootNode
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AnimationNodeAnimation<class_AnimationNodeAnimation>`, :ref:`AnimationNodeBlendSpace1D<class_AnimationNodeBlendSpace1D>`, :ref:`AnimationNodeBlendSpace2D<class_AnimationNodeBlendSpace2D>`, :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`, :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`
|
||||
**派生:** :ref:`AnimationNodeAnimation<class_AnimationNodeAnimation>`, :ref:`AnimationNodeBlendSpace1D<class_AnimationNodeBlendSpace1D>`, :ref:`AnimationNodeBlendSpace2D<class_AnimationNodeBlendSpace2D>`, :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`, :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`
|
||||
|
||||
包含一个或多个复合动画的 :ref:`AnimationNode<class_AnimationNode>` 的基类。通常用于 :ref:`AnimationTree.tree_root<class_AnimationTree_property_tree_root>`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AnimationRootNode** 是存放完整动画的 :ref:`AnimationNode<class_AnimationNode>` 的基类。完整动画指的是 :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>` 中 :ref:`AnimationNodeOutput<class_AnimationNodeOutput>` 的输出,或者其他 **AnimationRootNode** 的输出。可以在 :ref:`AnimationTree.tree_root<class_AnimationTree_property_tree_root>` 或其他 **AnimationRootNode** 中使用。
|
||||
|
||||
@@ -27,15 +27,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AnimationTree
|
||||
=============
|
||||
|
||||
**Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AnimationMixer<class_AnimationMixer>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于 :ref:`AnimationPlayer<class_AnimationPlayer>` 中高级动画过渡的节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
用于 :ref:`AnimationPlayer<class_AnimationPlayer>` 中高级动画过渡的节点。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>`
|
||||
|
||||
@@ -34,53 +34,35 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`active<class_AnimationTree_property_active>` | ``false`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`advance_expression_base_node<class_AnimationTree_property_advance_expression_base_node>` | ``NodePath(".")`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`anim_player<class_AnimationTree_property_anim_player>` | ``NodePath("")`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`int<class_int>` | :ref:`audio_max_polyphony<class_AnimationTree_property_audio_max_polyphony>` | ``32`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` | :ref:`process_callback<class_AnimationTree_property_process_callback>` | ``1`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` | ``NodePath("")`` |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
| :ref:`AnimationNode<class_AnimationNode>` | :ref:`tree_root<class_AnimationTree_property_tree_root>` | |
|
||||
+------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+
|
||||
+---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`advance_expression_base_node<class_AnimationTree_property_advance_expression_base_node>` | ``NodePath(".")`` |
|
||||
+---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`NodePath<class_NodePath>` | :ref:`anim_player<class_AnimationTree_property_anim_player>` | ``NodePath("")`` |
|
||||
+---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | deterministic | ``true`` (overrides :ref:`AnimationMixer<class_AnimationMixer_property_deterministic>`) |
|
||||
+---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationRootNode<class_AnimationRootNode>` | :ref:`tree_root<class_AnimationTree_property_tree_root>` | |
|
||||
+---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_Variant>` | :ref:`_post_process_key_value<class_AnimationTree_method__post_process_key_value>` **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`advance<class_AnimationTree_method_advance>` **(** :ref:`float<class_float>` delta **)** |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_position<class_AnimationTree_method_get_root_motion_position>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_position_accumulator<class_AnimationTree_method_get_root_motion_position_accumulator>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Quaternion<class_Quaternion>` | :ref:`get_root_motion_rotation<class_AnimationTree_method_get_root_motion_rotation>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Quaternion<class_Quaternion>` | :ref:`get_root_motion_rotation_accumulator<class_AnimationTree_method_get_root_motion_rotation_accumulator>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_scale<class_AnimationTree_method_get_root_motion_scale>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`get_root_motion_scale_accumulator<class_AnimationTree_method_get_root_motion_scale_accumulator>` **(** **)** |const| |
|
||||
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` | :ref:`get_process_callback<class_AnimationTree_method_get_process_callback>` **(** **)** |const| |
|
||||
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_process_callback<class_AnimationTree_method_set_process_callback>` **(** :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` mode **)** |
|
||||
+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -88,21 +70,7 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
|
||||
.. _class_AnimationTree_signal_animation_finished:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_finished** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
|
||||
某个动画完成播放时发出通知。
|
||||
|
||||
\ **注意:**\ 如果动画需要循环或者是被中止的,则不会发出该信号。另外请意识到可能存在同步和过渡所导致的不可见的播放。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_signal_animation_player_changed:
|
||||
@@ -111,21 +79,7 @@ Signals
|
||||
|
||||
**animation_player_changed** **(** **)**
|
||||
|
||||
当 :ref:`anim_player<class_AnimationTree_property_anim_player>` 被改变时触发。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_signal_animation_started:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**animation_started** **(** :ref:`StringName<class_StringName>` anim_name **)**
|
||||
|
||||
某个动画完成播放时发出通知。
|
||||
|
||||
\ **注意:**\ 如果动画需要循环或者是被中止的,则不会发出该信号。另外请意识到可能存在同步和过渡所导致的不可见的播放。
|
||||
当 :ref:`anim_player<class_AnimationTree_property_anim_player>` 被改变时发出。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -133,8 +87,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AnimationTree_AnimationProcessCallback:
|
||||
|
||||
@@ -148,7 +102,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_PHYSICS** = ``0``
|
||||
|
||||
动画将在物理帧期间推进(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`\ )。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`\ 。
|
||||
|
||||
.. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE:
|
||||
|
||||
@@ -156,7 +110,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_IDLE** = ``1``
|
||||
|
||||
动画将在处理帧期间推进(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`\ )。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE>`\ 。
|
||||
|
||||
.. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL:
|
||||
|
||||
@@ -164,7 +118,7 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **ANIMATION_PROCESS_MANUAL** = ``2``
|
||||
|
||||
只能手动行进动画(见 :ref:`advance<class_AnimationTree_method_advance>`\ )。
|
||||
用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL>`\ 。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -172,25 +126,8 @@ enum **AnimationProcessCallback**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_AnimationTree_property_active:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **active** = ``false``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_active** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_active** **(** **)**
|
||||
|
||||
如果 ``true`` 时,\ **AnimationTree** 将执行逻辑处理。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationTree_property_advance_expression_base_node:
|
||||
|
||||
@@ -203,7 +140,7 @@ Property Descriptions
|
||||
- void **set_advance_expression_base_node** **(** :ref:`NodePath<class_NodePath>` value **)**
|
||||
- :ref:`NodePath<class_NodePath>` **get_advance_expression_base_node** **(** **)**
|
||||
|
||||
用于评估 AnimationNode :ref:`Expression<class_Expression>` 的 :ref:`Node<class_Node>` 的路径,如果内部未明确指定路径时使用。
|
||||
用于评估 :ref:`AnimationNode<class_AnimationNode>` :ref:`Expression<class_Expression>` 的 :ref:`Node<class_Node>` 的路径,内部未明确指定路径时使用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -226,73 +163,18 @@ Property Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_property_audio_max_polyphony:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **audio_max_polyphony** = ``32``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_audio_max_polyphony** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_audio_max_polyphony** **(** **)**
|
||||
|
||||
每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。
|
||||
|
||||
例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>` 可以同时播放最多 ``32`` 个声音。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_property_process_callback:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **process_callback** = ``1``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_process_callback** **(** :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` value **)**
|
||||
- :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **get_process_callback** **(** **)**
|
||||
|
||||
该 **AnimationTree** 的处理模式。可用的模式见 :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_property_root_motion_track:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`NodePath<class_NodePath>` **root_motion_track** = ``NodePath("")``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_root_motion_track** **(** :ref:`NodePath<class_NodePath>` value **)**
|
||||
- :ref:`NodePath<class_NodePath>` **get_root_motion_track** **(** **)**
|
||||
|
||||
用于根部运动的动画轨道的路径。路径必须是指向节点的场景树有效路径,必须从将实现动画的节点的父节点开始指定。要指定控件属性或骨骼的轨道,请在路径后附加其名称,用 ``":"`` 隔开。例如,\ ``"character/skeleton:ankle"`` 或 ``"character/mesh:transform/local"``\ 。
|
||||
|
||||
如果轨道的类型是 :ref:`Animation.TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`\ 、\ :ref:`Animation.TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>`\ 、或者 :ref:`Animation.TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>`\ ,那么将取消视觉上的变换,其动画看起来将是留在原地。参阅 :ref:`get_root_motion_position<class_AnimationTree_method_get_root_motion_position>`\ 、\ :ref:`get_root_motion_rotation<class_AnimationTree_method_get_root_motion_rotation>`\ 、\ :ref:`get_root_motion_scale<class_AnimationTree_method_get_root_motion_scale>`\ 、和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_property_tree_root:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`AnimationNode<class_AnimationNode>` **tree_root**
|
||||
:ref:`AnimationRootNode<class_AnimationRootNode>` **tree_root**
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_tree_root** **(** :ref:`AnimationNode<class_AnimationNode>` value **)**
|
||||
- :ref:`AnimationNode<class_AnimationNode>` **get_tree_root** **(** **)**
|
||||
- void **set_tree_root** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` value **)**
|
||||
- :ref:`AnimationRootNode<class_AnimationRootNode>` **get_tree_root** **(** **)**
|
||||
|
||||
该 **AnimationTree** 的根动画节点。见 :ref:`AnimationNode<class_AnimationNode>`\ 。
|
||||
该 **AnimationTree** 的根动画节点。见 :ref:`AnimationRootNode<class_AnimationRootNode>`\ 。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -300,256 +182,33 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AnimationTree_method__post_process_key_value:
|
||||
.. _class_AnimationTree_method_get_process_callback:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Variant<class_Variant>` **_post_process_key_value** **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const|
|
||||
:ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` **get_process_callback** **(** **)** |const|
|
||||
|
||||
一个用于播放期间键获取之后的处理的虚函数。
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_advance:
|
||||
.. _class_AnimationTree_method_set_process_callback:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **advance** **(** :ref:`float<class_float>` delta **)**
|
||||
void **set_process_callback** **(** :ref:`AnimationProcessCallback<enum_AnimationTree_AnimationProcessCallback>` mode **)**
|
||||
|
||||
手动将动画前进指定的时间(单位为秒)。
|
||||
用于向后兼容。见 :ref:`AnimationCallbackModeProcess<enum_AnimationMixer_AnimationCallbackModeProcess>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_position:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_position** **(** **)** |const|
|
||||
|
||||
将具有 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的位置的运动增量,检索为一个可以在其他地方使用的 :ref:`Vector3<class_Vector3>`\ 。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 不是 :ref:`Animation.TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>` 类型轨道的路径,则返回 ``Vector3(0, 0, 0)``\ 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的示例是将位置应用于 :ref:`CharacterBody3D<class_CharacterBody3D>`\ :
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var current_rotation: Quaternion
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_rotation = get_quaternion()
|
||||
state_machine.travel("Animate")
|
||||
var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta
|
||||
set_velocity(velocity)
|
||||
move_and_slide()
|
||||
|
||||
|
||||
|
||||
通过将其与 :ref:`get_root_motion_position_accumulator<class_AnimationTree_method_get_root_motion_position_accumulator>` 结合使用,你可以更正确地应用根运动位置来考虑节点的旋转。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())
|
||||
var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta
|
||||
set_velocity(velocity)
|
||||
move_and_slide()
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_position_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_position_accumulator** **(** **)** |const|
|
||||
|
||||
检索具有 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的位置轨道的混合值,返回的是可以在其他地方使用的 :ref:`Vector3<class_Vector3>`\ 。
|
||||
|
||||
在想要遵循动画的初始动画帧值的情况下很有用。
|
||||
|
||||
例如,如果前一帧播放的是一个只有单个动画帧 ``Vector3(0, 0, 0)`` 的动画,然后下一帧播放的是一个只有单个动画帧\ ``Vector3(1, 0, 1)`` 的动画,它们之间的差异可以这样计算:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_position_accumulator: Vector3
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator()
|
||||
var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator
|
||||
prev_root_motion_position_accumulator = current_root_motion_position_accumulator
|
||||
transform.origin += difference
|
||||
|
||||
|
||||
|
||||
不过,如果动画是循环播放的,就可能会发生预料之外的不连续变化,所以这只对一些简单的情况有用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_rotation:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Quaternion<class_Quaternion>` **get_root_motion_rotation** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的旋转运动,作为一个 :ref:`Quaternion<class_Quaternion>`\ ,可以在其他地方使用。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 不是 :ref:`Animation.TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` 类型的轨迹的路径,返回 ``Quaternion(0, 0, 0, 1)`` 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的例子是对 :ref:`CharacterBody3D<class_CharacterBody3D>` 应用旋转。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation() )
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_rotation_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Quaternion<class_Quaternion>` **get_root_motion_rotation_accumulator** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的旋转轨道的混合值,作为一个 :ref:`Quaternion<class_Quaternion>`\ ,可以在其他地方使用。
|
||||
|
||||
这里必须正确地结合根运动位置,并且要考虑到旋转。参考 :ref:`get_root_motion_position<class_AnimationTree_method_get_root_motion_position>`\ 。
|
||||
|
||||
并且,当你想重视动画的初始动画帧的值时,这会很有用。
|
||||
|
||||
比如说,如果一个动画在上一帧只播放一个 ``Quaternion(0, 0, 0, 1)`` 动画帧,并且一个动画在下一帧只播放了一个动画帧的 ``Quaternion(0, 0.707, 0, 0.707)`` 时,它们相差的值可以这样求出:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_rotation_accumulator: Quaternion
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator()
|
||||
var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator
|
||||
prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator
|
||||
transform.basis *= difference
|
||||
|
||||
|
||||
|
||||
然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_scale:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_scale** **(** **)** |const|
|
||||
|
||||
获取 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的缩放运动增量,类型为 :ref:`Vector3<class_Vector3>`\ ,可以在其他地方使用。
|
||||
|
||||
如果 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 不是类型为 :ref:`Animation.TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` 的轨道的路径,则返回 ``Vector3(0, 0, 0)`` 。
|
||||
|
||||
另见 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 和 :ref:`RootMotionView<class_RootMotionView>`\ 。
|
||||
|
||||
最基本的例子是对 :ref:`CharacterBody3D<class_CharacterBody3D>` 应用缩放。
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var current_scale: Vector3 = Vector3(1, 1, 1)
|
||||
var scale_accum: Vector3 = Vector3(1, 1, 1)
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
current_scale = get_scale()
|
||||
scale_accum = Vector3(1, 1, 1)
|
||||
state_machine.travel("Animate")
|
||||
scale_accum += animation_tree.get_root_motion_scale()
|
||||
set_scale(current_scale * scale_accum)
|
||||
|
||||
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AnimationTree_method_get_root_motion_scale_accumulator:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector3<class_Vector3>` **get_root_motion_scale_accumulator** **(** **)** |const|
|
||||
|
||||
检索带有 :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` 的缩放轨道的混合值,作为一个 :ref:`Vector3<class_Vector3>`\ ,可以在其他地方使用。
|
||||
|
||||
例如,如果一个动画在前一帧只播放了一个动画帧 ``Vector3(1, 1, 1)``\ ,并且一个动画在后一帧只播放了一个动画帧 ``Vector3(2, 2, 2)``\ ,他们之间相差的值可以这样求出:
|
||||
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var prev_root_motion_scale_accumulator: Vector3
|
||||
|
||||
func _process(delta):
|
||||
if Input.is_action_just_pressed("animate"):
|
||||
state_machine.travel("Animate")
|
||||
var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator()
|
||||
var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator
|
||||
prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator
|
||||
transform.basis = transform.basis.scaled(difference)
|
||||
|
||||
|
||||
|
||||
然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
Area2D
|
||||
======
|
||||
|
||||
**Inherits:** :ref:`CollisionObject2D<class_CollisionObject2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`CollisionObject2D<class_CollisionObject2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
2D 空间的一个区块,用于检测其他 :ref:`CollisionObject2D<class_CollisionObject2D>` 进入或退出它。
|
||||
2D 空间中的一个区域,能够检测到其他 :ref:`CollisionObject2D<class_CollisionObject2D>` 的进入或退出。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**Area2D** 是 2D 空间中的一个区域,由一个或多个 :ref:`CollisionShape2D<class_CollisionShape2D>` 或 :ref:`CollisionPolygon2D<class_CollisionPolygon2D>` 子节点定义,能够检测到其他 :ref:`CollisionObject2D<class_CollisionObject2D>` 进入或退出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 Area2D <../tutorials/physics/using_area_2d>`
|
||||
|
||||
@@ -38,8 +38,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -78,8 +78,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -104,8 +104,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_Area2D_signal_area_entered:
|
||||
|
||||
@@ -243,8 +243,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_Area2D_SpaceOverride:
|
||||
|
||||
@@ -298,8 +298,8 @@ enum **SpaceOverride**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_Area2D_property_angular_damp:
|
||||
|
||||
@@ -564,8 +564,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Area2D_method_get_overlapping_areas:
|
||||
|
||||
@@ -649,10 +649,10 @@ Method Descriptions
|
||||
|
||||
参数 ``body`` 可以是 :ref:`PhysicsBody2D<class_PhysicsBody2D>` 实例,也可以是 :ref:`TileMap<class_TileMap>` 实例。TileMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
Area3D
|
||||
======
|
||||
|
||||
**Inherits:** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
3D 空间的一个区块,用于检测其他 :ref:`CollisionObject3D<class_CollisionObject3D>` 进入或退出它。
|
||||
3D 空间中的一个区域,能够检测到其他 :ref:`CollisionObject3D<class_CollisionObject3D>` 的进入或退出。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**Area3D** is a region of 3D space defined by one or multiple :ref:`CollisionShape3D<class_CollisionShape3D>` or :ref:`CollisionPolygon3D<class_CollisionPolygon3D>` child nodes. It detects when other :ref:`CollisionObject3D<class_CollisionObject3D>`\ s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it).
|
||||
**Area3D** 是 3D 空间中的一个区域,由一个或多个 :ref:`CollisionShape3D<class_CollisionShape3D>` 或 :ref:`CollisionPolygon3D<class_CollisionPolygon3D>` 子节点定义,能够检测到其他 :ref:`CollisionObject3D<class_CollisionObject3D>` 进入或退出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。
|
||||
|
||||
This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses.
|
||||
这个节点也可以在局部修改或覆盖物理参数(重力、阻尼),将音频引导至自定义音频总线。
|
||||
|
||||
\ **Warning:** Using a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` inside a :ref:`CollisionShape3D<class_CollisionShape3D>` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D<class_MeshInstance3D>` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>`\ s or primitive shapes like :ref:`BoxShape3D<class_BoxShape3D>`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`.
|
||||
\ **警告:**\ 在这个节点的 :ref:`CollisionShape3D<class_CollisionShape3D>` 子节点中使用 :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>`\ (创建方法是在选中 :ref:`MeshInstance3D<class_MeshInstance3D>` 节点后,在出现的 **Mesh** 菜单中选择\ **创建三角网格碰撞同级**\ 选项)可能得到意外的结果,因为碰撞形状是空心的。如果不想要这种行为,则应该将其拆分为多个 :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` 或 :ref:`BoxShape3D<class_BoxShape3D>` 等基础网格,有些情况下也可以用 :ref:`CollisionPolygon3D<class_CollisionPolygon3D>` 代替。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 Area2D <../tutorials/physics/using_area_2d>`
|
||||
|
||||
@@ -38,8 +38,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -92,8 +92,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -118,8 +118,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_Area3D_signal_area_entered:
|
||||
|
||||
@@ -194,7 +194,7 @@ Signals
|
||||
|
||||
**body_entered** **(** :ref:`Node3D<class_Node3D>` body **)**
|
||||
|
||||
当接收到的 ``body`` 进入这个区域时触发。\ ``body`` 可以是一个 :ref:`PhysicsBody3D<class_PhysicsBody3D>` 或一个 :ref:`GridMap<class_GridMap>`\ 。如果 :ref:`GridMap<class_GridMap>` 的 :ref:`MeshLibrary<class_MeshLibrary>` 配置了碰撞形状,就会被检测到。需要将 :ref:`monitoring<class_Area3D_property_monitoring>` 设置为 ``true`` 。
|
||||
当接收到的 ``body`` 进入这个区域时发出。\ ``body`` 可以是一个 :ref:`PhysicsBody3D<class_PhysicsBody3D>` 或一个 :ref:`GridMap<class_GridMap>`\ 。如果 :ref:`GridMap<class_GridMap>` 的 :ref:`MeshLibrary<class_MeshLibrary>` 配置了碰撞形状就会被检测到。需要将 :ref:`monitoring<class_Area3D_property_monitoring>` 设置为 ``true`` 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -257,8 +257,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_Area3D_SpaceOverride:
|
||||
|
||||
@@ -312,8 +312,8 @@ enum **SpaceOverride**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_Area3D_property_angular_damp:
|
||||
|
||||
@@ -697,8 +697,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Area3D_method_get_overlapping_areas:
|
||||
|
||||
@@ -782,10 +782,10 @@ Method Descriptions
|
||||
|
||||
参数 ``body`` 可以是 :ref:`PhysicsBody3D<class_PhysicsBody3D>` 实例,也可以是 :ref:`GridMap<class_GridMap>` 实例。GridMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -14,8 +14,8 @@ Array
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
通用数组,可以包含任意类型的多个元素,可以通过从 0 开始的数字索引进行访问。负数索引可以用来从后面数起,就像在 Python 中一样(-1 是最后一个元素、-2 是倒数第二,以此类推)。
|
||||
|
||||
@@ -70,12 +70,12 @@ Description
|
||||
|
||||
.. note::
|
||||
|
||||
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
|
||||
通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Constructors
|
||||
------------
|
||||
构造函数
|
||||
--------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -108,8 +108,8 @@ Constructors
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -210,8 +210,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Operators
|
||||
---------
|
||||
操作符
|
||||
------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -240,8 +240,8 @@ Operators
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constructor Descriptions
|
||||
------------------------
|
||||
构造函数说明
|
||||
------------
|
||||
|
||||
.. _class_Array_constructor_Array:
|
||||
|
||||
@@ -367,8 +367,8 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Array_method_all:
|
||||
|
||||
@@ -565,13 +565,13 @@ void **clear** **(** **)**
|
||||
|
||||
void **erase** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at<class_Array_method_remove_at>` instead.
|
||||
从数组中移除第一个匹配的值。如果数组中不存在该值,则什么也不会发生。要通过索引移除元素,请改用 :ref:`remove_at<class_Array_method_remove_at>`\ 。
|
||||
|
||||
\ **Note:** This method acts in-place and doesn't return a modified array.
|
||||
\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
|
||||
\ **注意:**\ 在大型数组上,如果移除的元素靠近数组的开头(索引 0),则此方法会较慢。这是因为所有放置在移除元素之后的元素都必须重新索引。
|
||||
|
||||
\ **Note:** Do not erase entries while iterating over the array.
|
||||
\ **注意:**\ 在遍历数组时不要移除条目。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -770,11 +770,11 @@ void **fill** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` position, :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``). Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the other :ref:`Error<enum_@GlobalScope_Error>` values if the operation failed.
|
||||
在给定的数组位置插入一个新值。位置必须合法,或者是在数组末尾(\ ``pos == size()``\ )。操作成功时返回 :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>`\ ,而如果操作失败则返回其他任意一个 :ref:`Error<enum_@GlobalScope_Error>` 值。
|
||||
|
||||
\ **Note:** This method acts in-place and doesn't return a modified array.
|
||||
\ **注意:**\ 该方法在原地执行,不会返回修改过的数组。
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed.
|
||||
\ **注意:**\ 在较大的数组中,如果插入值的位置在数组偏前的位置,这个方法的运行速度会比较慢,因为在插入值后面所有的元素都要被重新索引。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -909,7 +909,7 @@ void **make_read_only** **(** **)**
|
||||
|
||||
:ref:`Variant<class_Variant>` **pick_random** **(** **)** |const|
|
||||
|
||||
Returns a random value from the target array. Prints an error and returns ``null`` if the array is empty.
|
||||
从目标数组中返回一个随机值。如果数组为空,则打印一个错误并返回 ``null``\ 。
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -917,12 +917,12 @@ Returns a random value from the target array. Prints an error and returns ``null
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var array: Array[int] = [1, 2, 3, 4]
|
||||
print(array.pick_random()) # Prints either of the four numbers.
|
||||
print(array.pick_random()) # 打印四个数字中的任何一个。
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
var array = new Godot.Collections.Array { 1, 2, 3, 4 };
|
||||
GD.Print(array.PickRandom()); // Prints either of the four numbers.
|
||||
GD.Print(array.PickRandom()); // 打印四个数字中的任何一个。
|
||||
|
||||
|
||||
|
||||
@@ -1027,13 +1027,13 @@ void **push_front** **(** :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
void **remove_at** **(** :ref:`int<class_int>` position **)**
|
||||
|
||||
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use :ref:`erase<class_Array_method_erase>` instead.
|
||||
通过索引从数组中移除元素。如果索引在数组中不存在,则什么也不会发生。要通过搜索一个元素的值来移除,请改用 :ref:`erase<class_Array_method_erase>`\ 。
|
||||
|
||||
\ **Note:** This method acts in-place and doesn't return a modified array.
|
||||
\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。
|
||||
|
||||
\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
|
||||
\ **注意:**\ 在大数组中,如果被删除的元素靠近数组的开头(索引 0),这个方法会比较慢。这是因为所有放置在被移除元素之后的元素都要被重新索引。
|
||||
|
||||
\ **Note:** ``position`` cannot be negative. To remove an element relative to the end of the array, use ``arr.remove_at(arr.size() - (i + 1))``. To remove the last element from the array without returning the value, use ``arr.resize(arr.size() - 1)``.
|
||||
\ **注意:**\ ``position`` 不能为负。要移除数组末尾的元素,请使用 ``arr.remove_at(arr.size() - (i + 1))``\ 。要移除数组末尾的元素并不返回值,请使用 ``arr.resize(arr.size() - 1)``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1045,9 +1045,9 @@ Removes an element from the array by index. If the index does not exist in the a
|
||||
|
||||
:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` size **)**
|
||||
|
||||
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or one of the other :ref:`Error<enum_@GlobalScope_Error>` values if the operation failed.
|
||||
调整数组的大小,让包含的元素数量发生变化。如果数组变小则清除多余元素,变大则新元素为 ``null``\ 。成功时返回 :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>`\ ,操作失败时返回其他 :ref:`Error<enum_@GlobalScope_Error>` 值。
|
||||
|
||||
\ **Note:** This method acts in-place and doesn't return a modified array.
|
||||
\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1107,17 +1107,17 @@ void **shuffle** **(** **)**
|
||||
|
||||
:ref:`Array<class_Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647, :ref:`int<class_int>` step=1, :ref:`bool<class_bool>` deep=false **)** |const|
|
||||
|
||||
Returns the slice of the **Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **Array**.
|
||||
返回该 **Array** 的切片,是从 ``begin``\ (含)到 ``end``\ (不含)的全新 **Array**\ 。
|
||||
|
||||
The absolute value of ``begin`` and ``end`` will be clamped to the array size, so the default value for ``end`` makes it slice to the size of the array by default (i.e. ``arr.slice(1)`` is a shorthand for ``arr.slice(1, arr.size())``).
|
||||
\ ``begin`` 和 ``end`` 的绝对值会按数组大小进行限制,所以 ``end`` 的默认值会切到数组大小为止(即 ``arr.slice(1)`` 是 ``arr.slice(1, arr.size())`` 的简写)。
|
||||
|
||||
If either ``begin`` or ``end`` are negative, they will be relative to the end of the array (i.e. ``arr.slice(0, -2)`` is a shorthand for ``arr.slice(0, arr.size() - 2)``).
|
||||
如果 ``begin`` 或 ``end`` 为负,则表示相对于数组的末尾(即 ``arr.slice(0, -2)`` 是 ``arr.slice(0, arr.size() - 2)`` 的简写)。
|
||||
|
||||
If specified, ``step`` is the relative index between source elements. It can be negative, then ``begin`` must be higher than ``end``. For example, ``[0, 1, 2, 3, 4, 5].slice(5, 1, -2)`` returns ``[5, 3]``.
|
||||
如果指定了 ``step``\ ,则会用作原始元素的索引间距。这个参数可以为负,此时 ``begin`` 必须大于 ``end``\ 。例如,\ ``[0, 1, 2, 3, 4, 5].slice(5, 1, -2)`` 会返回 ``[5, 3]``\ 。
|
||||
|
||||
If ``deep`` is true, each element will be copied by value rather than by reference.
|
||||
如果 ``deep`` 为 true,则每个元素都会按值复制,而不是按引用复制。
|
||||
|
||||
\ **Note:** To include the first element when ``step`` is negative, use ``arr.slice(begin, -arr.size() - 1, step)`` (i.e. ``[0, 1, 2].slice(1, -4, -1)`` returns ``[1, 0]``).
|
||||
\ **注意:**\ 要在 ``step`` 为负时包含第一个元素,请使用 ``arr.slice(begin, -arr.size() - 1, step)``\ (即 ``[0, 1, 2].slice(1, -4, -1)`` 返回 ``[1, 0]``\ )。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -1207,8 +1207,8 @@ void **sort_custom** **(** :ref:`Callable<class_Callable>` func **)**
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Operator Descriptions
|
||||
---------------------
|
||||
操作符说明
|
||||
----------
|
||||
|
||||
.. _class_Array_operator_neq_Array:
|
||||
|
||||
@@ -1302,10 +1302,10 @@ Operator Descriptions
|
||||
|
||||
该函数返回指定位置的 :ref:`Variant<class_Variant>` 类型元素的引用。数组从索引0开始。 ``index`` 可以是一个从头开始的零或正值,也可以是一个从末尾开始的负值。访问越界的数组会导致运行时错误,这将导致在编辑器中运行时打印错误并暂停项目执行。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
ArrayMesh
|
||||
=========
|
||||
|
||||
**Inherits:** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`Mesh<class_Mesh>` 网格类型,提供了用于从数组构造表面的工具。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**ArrayMesh** 是用来构造 :ref:`Mesh<class_Mesh>` 的,其属性指定为数组。
|
||||
|
||||
@@ -74,15 +74,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用 ArrayMesh 的程序化几何体 <../tutorials/3d/procedural_geometry/arraymesh>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -97,8 +97,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -149,8 +149,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_ArrayMesh_property_blend_shape_mode:
|
||||
|
||||
@@ -205,8 +205,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_ArrayMesh_method_add_blend_shape:
|
||||
|
||||
@@ -420,7 +420,7 @@ void **surface_update_attribute_region** **(** :ref:`int<class_int>` surf_idx, :
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -434,7 +434,7 @@ void **surface_update_skin_region** **(** :ref:`int<class_int>` surf_idx, :ref:`
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -448,12 +448,12 @@ void **surface_update_vertex_region** **(** :ref:`int<class_int>` surf_idx, :ref
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
ArrayOccluder3D
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`Occluder3D<class_Occluder3D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Occluder3D<class_Occluder3D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于与 :ref:`OccluderInstance3D<class_OccluderInstance3D>` 中的遮挡剔除一起使用的 3D 多边形形状。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**ArrayOccluder3D** 存储一个任意的 3D 多边形形状,可供引擎的遮挡剔除系统使用。这类似于 :ref:`ArrayMesh<class_ArrayMesh>`\ ,但适用于遮挡物。
|
||||
|
||||
@@ -25,15 +25,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>`
|
||||
- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -46,8 +46,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -62,8 +62,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_ArrayOccluder3D_property_indices:
|
||||
|
||||
@@ -105,8 +105,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_ArrayOccluder3D_method_set_arrays:
|
||||
|
||||
@@ -116,10 +116,10 @@ void **set_arrays** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` ve
|
||||
|
||||
设置 :ref:`indices<class_ArrayOccluder3D_property_indices>` 和 :ref:`vertices<class_ArrayOccluder3D_property_vertices>`\ ,同时会在两个值都被设置后仅更新一次最终遮挡物。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AspectRatioContainer
|
||||
====================
|
||||
|
||||
**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
保留子控件长宽比的容器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一种容器类型,它以一种在调整容器大小时自动保持其比例的方式排列其子控件。当容器具有动态大小,并且子节点必须相应地调整其大小而不丢失其长宽比时很有用。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用容器 <../tutorials/ui/gui_containers>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -52,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AspectRatioContainer_StretchMode:
|
||||
|
||||
@@ -135,8 +135,8 @@ enum **AlignmentMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AspectRatioContainer_property_alignment_horizontal:
|
||||
|
||||
@@ -202,10 +202,10 @@ Property Descriptions
|
||||
|
||||
用来对齐子控件的拉伸模式。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AStar2D
|
||||
=======
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
A\* 的一种实现,用于查找 2D 空间中连通图上两个顶点之间的最短路径。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
A\* 算法的一种实现,用于在 2D 空间中的连通图上找到两个顶点之间的最短路径。
|
||||
|
||||
@@ -25,16 +25,16 @@ A\* 算法的一种实现,用于在 2D 空间中的连通图上找到两个顶
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStar2D_method__compute_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStar2D_private_method__compute_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar2D_method__estimate_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar2D_private_method__estimate_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_AStar2D_method_add_point>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` position, :ref:`float<class_float>` weight_scale=1.0 **)** |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -89,10 +89,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AStar2D_method__compute_cost:
|
||||
.. _class_AStar2D_private_method__compute_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -106,7 +106,7 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar2D_method__estimate_cost:
|
||||
.. _class_AStar2D_private_method__estimate_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -128,7 +128,7 @@ void **add_point** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>`
|
||||
|
||||
在具有给定标识符的给定位置添加一个新点。\ ``id`` 必须为 0 或更大,\ ``weight_scale`` 必须为 0.0 或更大。
|
||||
|
||||
在确定从相邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar2D_method__compute_cost>` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。
|
||||
在确定从相邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar2D_private_method__compute_cost>` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -522,12 +522,12 @@ void **set_point_position** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_
|
||||
|
||||
void **set_point_weight_scale** **(** :ref:`int<class_int>` id, :ref:`float<class_float>` weight_scale **)**
|
||||
|
||||
为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar2D_method__compute_cost>` 的结果。
|
||||
为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar2D_private_method__compute_cost>` 的结果。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,20 +10,20 @@
|
||||
AStar3D
|
||||
=======
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
A\* 的一种实现,用于寻找 3D 空间中连接图中的两个顶点之间的最短路径。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
A\*(A 星)是一种计算机算法,用于寻路和图遍历,是通过一组给定的边(线段),在顶点(点)之间绘制短路径的过程。由于其性能和准确性,它被广泛使用。Godot 的 A\* 实现默认使用 3D 空间中的点和欧几里得距离。
|
||||
A\*(A 星)是一种计算机算法,用于寻路和图遍历,即穿过一组给定的边(线段),在顶点(点)之间绘制短路径的过程。由于其性能和准确性,它被广泛使用。Godot 的 A\* 实现默认使用 3D 空间中的点和欧几里德距离。
|
||||
|
||||
你需要使用 :ref:`add_point<class_AStar3D_method_add_point>` 手动添加点,并使用 :ref:`connect_points<class_AStar3D_method_connect_points>` 手动创建线段。完成后,可以使用 :ref:`are_points_connected<class_AStar3D_method_are_points_connected>` 函数,测试两点之间是否存在路径,通过 :ref:`get_id_path<class_AStar3D_method_get_id_path>` 获取包含索引的路径,或使用 :ref:`get_point_path<class_AStar3D_method_get_point_path>` 获取包含实际坐标的路径。
|
||||
|
||||
也可以使用非欧几里得距离。为此,创建一个扩展 ``AStar3D`` 的类,并覆盖方法 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 和 :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>`\ 。两者都接受两个索引并返回一个长度,如以下示例所示。
|
||||
也可以使用非欧几里德距离。为此,创建一个扩展 **AStar3D** 的类,并覆盖方法 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 和 :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>`\ 。两者都接受两个索引并返回一个长度,如以下示例所示。
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -56,22 +56,22 @@ A\*(A 星)是一种计算机算法,用于寻路和图遍历,是通过一
|
||||
|
||||
|
||||
|
||||
\ :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>` 应该返回距离的下限,即 ``_estimate_cost(u, v) <= _compute_cost(u, v)``\ 。这可以作为算法的提示,因为自定义 ``_compute_cost`` 可能计算量很大。如果不是这种情况,请使 :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>` 返回与 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 相同的值,以便为算法提供最准确的信息。
|
||||
\ :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>` 应该返回距离的下限,即 ``_estimate_cost(u, v) <= _compute_cost(u, v)``\ 。这可以作为算法的提示,因为自定义 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 可能计算量很大。如果不是这种情况,请使 :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>` 返回与 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 相同的值,以便为算法提供最准确的信息。
|
||||
|
||||
如果使用默认的 :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>` 和 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 方法,或者如果提供的 :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>` 方法返回成本的下限,则 A\* 返回的路径将是成本最低的路径。这里,路径的代价等于路径中所有段的 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 结果乘以各个段端点的权重 ``weight_scale`` 之和。如果使用默认方法,并且所有点的 ``weight_scale`` 设置为 ``1.0``\ ,则这等于路径中所有段的欧几里得距离之和。
|
||||
如果使用默认的 :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>` 和 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 方法,或者如果提供的 :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>` 方法返回成本的下限,则 A\* 返回的路径将是成本最低的路径。这里,路径的代价等于路径中所有段的 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 结果乘以各个段端点的权重 ``weight_scale`` 之和。如果使用默认方法,并且所有点的 ``weight_scale`` 设置为 ``1.0``\ ,则这等于路径中所有段的欧几里德距离之和。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStar3D_method__compute_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar3D_method__estimate_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStar3D_private_method__estimate_cost>` **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_point<class_AStar3D_method_add_point>` **(** :ref:`int<class_int>` id, :ref:`Vector3<class_Vector3>` position, :ref:`float<class_float>` weight_scale=1.0 **)** |
|
||||
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -126,32 +126,32 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AStar3D_method__compute_cost:
|
||||
.. _class_AStar3D_private_method__compute_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **_compute_cost** **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const|
|
||||
|
||||
在计算两个连接点之间的成本时调用。
|
||||
计算两个连接点之间的成本时调用。
|
||||
|
||||
请注意,此函数隐藏在默认的 ``AStar3D`` 类中。
|
||||
注意这个函数隐藏在默认的 **AStar3D** 类中。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStar3D_method__estimate_cost:
|
||||
.. _class_AStar3D_private_method__estimate_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **_estimate_cost** **(** :ref:`int<class_int>` from_id, :ref:`int<class_int>` to_id **)** |virtual| |const|
|
||||
|
||||
在估算一个点和路径终点之间的成本时调用。
|
||||
估计一个点和路径终点之间的成本时调用。
|
||||
|
||||
请注意,此函数隐藏在默认的 ``AStar3D`` 类中。
|
||||
注意这个函数隐藏在默认的 **AStar3D** 类中。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -165,7 +165,7 @@ void **add_point** **(** :ref:`int<class_int>` id, :ref:`Vector3<class_Vector3>`
|
||||
|
||||
在给定的位置添加一个新的点,并使用给定的标识符。\ ``id`` 必须大于等于 0,\ ``weight_scale`` 必须大于等于 0.0。
|
||||
|
||||
在确定从邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。
|
||||
在确定从邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -369,7 +369,7 @@ void **disconnect_points** **(** :ref:`int<class_int>` id, :ref:`int<class_int>`
|
||||
|
||||
:ref:`int<class_int>` **get_point_capacity** **(** **)** |const|
|
||||
|
||||
返回支持点的结构的容量,与 ``reserve_space`` 配合使用。
|
||||
该函数返回支持点的数据结构的容量,可以与 :ref:`reserve_space<class_AStar3D_method_reserve_space>` 方法一起使用。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -557,12 +557,12 @@ void **set_point_position** **(** :ref:`int<class_int>` id, :ref:`Vector3<class_
|
||||
|
||||
void **set_point_weight_scale** **(** :ref:`int<class_int>` id, :ref:`float<class_float>` weight_scale **)**
|
||||
|
||||
为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar3D_method__compute_cost>` 的结果。
|
||||
为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStar3D_private_method__compute_cost>` 的结果。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,18 +10,18 @@
|
||||
AStarGrid2D
|
||||
===========
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
A\* 的一种实现,用于寻找疏松 2D 网格中两点之间的最短路径。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AStarGrid2D** is a variant of :ref:`AStar2D<class_AStar2D>` that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations.
|
||||
**AStarGrid2D** 是 :ref:`AStar2D<class_AStar2D>` 的变种,针对疏松 2D 网格进行了优化。因为不需要手动创建点并进行连接,所以用起来更加简单。这个类还支持使用不同的启发方法、斜向移动模式、跳跃模式,从而加速运算。
|
||||
|
||||
To use **AStarGrid2D**, you only need to set the :ref:`region<class_AStarGrid2D_property_region>` of the grid, optionally set the :ref:`cell_size<class_AStarGrid2D_property_cell_size>`, and then call the :ref:`update<class_AStarGrid2D_method_update>` method:
|
||||
要使用 **AStarGrid2D**\ ,你只需要设置网格的 :ref:`region<class_AStarGrid2D_property_region>`\ ,\ :ref:`cell_size<class_AStarGrid2D_property_cell_size>` 可以不设置,最后调用 :ref:`update<class_AStarGrid2D_method_update>` 方法即可:
|
||||
|
||||
|
||||
.. tabs::
|
||||
@@ -32,8 +32,8 @@ To use **AStarGrid2D**, you only need to set the :ref:`region<class_AStarGrid2D_
|
||||
astar_grid.region = Rect2i(0, 0, 32, 32)
|
||||
astar_grid.cell_size = Vector2(16, 16)
|
||||
astar_grid.update()
|
||||
print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
||||
print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
||||
print(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # 输出 (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
||||
print(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # 输出 (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
@@ -41,17 +41,17 @@ To use **AStarGrid2D**, you only need to set the :ref:`region<class_AStarGrid2D_
|
||||
astarGrid.Region = new Rect2I(0, 0, 32, 32);
|
||||
astarGrid.CellSize = new Vector2I(16, 16);
|
||||
astarGrid.Update();
|
||||
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
||||
GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
||||
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // 输出 (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
|
||||
GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // 输出 (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
|
||||
|
||||
|
||||
|
||||
To remove a point from the pathfinding grid, it must be set as "solid" with :ref:`set_point_solid<class_AStarGrid2D_method_set_point_solid>`.
|
||||
要从寻路网格中移除某个点,必须使用 :ref:`set_point_solid<class_AStarGrid2D_method_set_point_solid>` 将其设置为“实心”。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -76,45 +76,45 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStarGrid2D_method__compute_cost>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStarGrid2D_method__estimate_cost>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_AStarGrid2D_method_clear>` **(** **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill_solid_region<class_AStarGrid2D_method_fill_solid_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`bool<class_bool>` solid=true **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill_weight_scale_region<class_AStarGrid2D_method_fill_weight_scale_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`float<class_float>` weight_scale **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_id_path<class_AStarGrid2D_method_get_id_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_point_path<class_AStarGrid2D_method_get_point_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_AStarGrid2D_method_get_point_position>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_point_weight_scale<class_AStarGrid2D_method_get_point_weight_scale>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_dirty<class_AStarGrid2D_method_is_dirty>` **(** **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_in_bounds<class_AStarGrid2D_method_is_in_bounds>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_in_boundsv<class_AStarGrid2D_method_is_in_boundsv>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_point_solid<class_AStarGrid2D_method_is_point_solid>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_solid<class_AStarGrid2D_method_set_point_solid>` **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`bool<class_bool>` solid=true **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_weight_scale<class_AStarGrid2D_method_set_point_weight_scale>` **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`float<class_float>` weight_scale **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_AStarGrid2D_method_update>` **(** **)** |
|
||||
+-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_compute_cost<class_AStarGrid2D_private_method__compute_cost>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_estimate_cost<class_AStarGrid2D_private_method__estimate_cost>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear<class_AStarGrid2D_method_clear>` **(** **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill_solid_region<class_AStarGrid2D_method_fill_solid_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`bool<class_bool>` solid=true **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`fill_weight_scale_region<class_AStarGrid2D_method_fill_weight_scale_region>` **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`float<class_float>` weight_scale **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_id_path<class_AStarGrid2D_method_get_id_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_point_path<class_AStarGrid2D_method_get_point_path>` **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_AStarGrid2D_method_get_point_position>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_point_weight_scale<class_AStarGrid2D_method_get_point_weight_scale>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_dirty<class_AStarGrid2D_method_is_dirty>` **(** **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_in_bounds<class_AStarGrid2D_method_is_in_bounds>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_in_boundsv<class_AStarGrid2D_method_is_in_boundsv>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_point_solid<class_AStarGrid2D_method_is_point_solid>` **(** :ref:`Vector2i<class_Vector2i>` id **)** |const| |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_solid<class_AStarGrid2D_method_set_point_solid>` **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`bool<class_bool>` solid=true **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_point_weight_scale<class_AStarGrid2D_method_set_point_weight_scale>` **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`float<class_float>` weight_scale **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update<class_AStarGrid2D_method_update>` **(** **)** |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -122,8 +122,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AStarGrid2D_Heuristic:
|
||||
|
||||
@@ -256,8 +256,8 @@ enum **DiagonalMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AStarGrid2D_property_cell_size:
|
||||
|
||||
@@ -287,7 +287,7 @@ Property Descriptions
|
||||
- void **set_default_compute_heuristic** **(** :ref:`Heuristic<enum_AStarGrid2D_Heuristic>` value **)**
|
||||
- :ref:`Heuristic<enum_AStarGrid2D_Heuristic>` **get_default_compute_heuristic** **(** **)**
|
||||
|
||||
默认 :ref:`Heuristic<enum_AStarGrid2D_Heuristic>`\ ,用于在没有覆盖 :ref:`_compute_cost<class_AStarGrid2D_method__compute_cost>` 时计算两点之间的消耗。
|
||||
默认 :ref:`Heuristic<enum_AStarGrid2D_Heuristic>`\ ,用于在没有覆盖 :ref:`_compute_cost<class_AStarGrid2D_private_method__compute_cost>` 时计算两点之间的消耗。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -304,7 +304,7 @@ Property Descriptions
|
||||
- void **set_default_estimate_heuristic** **(** :ref:`Heuristic<enum_AStarGrid2D_Heuristic>` value **)**
|
||||
- :ref:`Heuristic<enum_AStarGrid2D_Heuristic>` **get_default_estimate_heuristic** **(** **)**
|
||||
|
||||
默认 :ref:`Heuristic<enum_AStarGrid2D_Heuristic>`\ ,用于在没有覆盖 :ref:`_estimate_cost<class_AStarGrid2D_method__estimate_cost>` 时计算该点和终点之间的消耗。
|
||||
默认 :ref:`Heuristic<enum_AStarGrid2D_Heuristic>`\ ,用于在没有覆盖 :ref:`_estimate_cost<class_AStarGrid2D_private_method__estimate_cost>` 时计算该点和终点之间的消耗。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -401,32 +401,32 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AStarGrid2D_method__compute_cost:
|
||||
.. _class_AStarGrid2D_private_method__compute_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **_compute_cost** **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const|
|
||||
|
||||
当计算两个连接点之间的代价时调用该函数。
|
||||
计算两个连接点之间的成本时调用。
|
||||
|
||||
请注意,该函数在默认的 ``AStarGrid2D`` 类中是隐藏的。
|
||||
注意这个函数隐藏在默认的 **AStarGrid2D** 类中。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AStarGrid2D_method__estimate_cost:
|
||||
.. _class_AStarGrid2D_private_method__estimate_cost:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **_estimate_cost** **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)** |virtual| |const|
|
||||
|
||||
当估算一个点和路径结束点之间的代价时,调用该函数。
|
||||
估计一个点和路径终点之间的成本时调用。
|
||||
|
||||
请注意,该函数在默认的 ``AStarGrid2D`` 类中是隐藏的。
|
||||
注意这个函数隐藏在默认的 **AStarGrid2D** 类中。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -450,9 +450,9 @@ void **clear** **(** **)**
|
||||
|
||||
void **fill_solid_region** **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`bool<class_bool>` solid=true **)**
|
||||
|
||||
Fills the given ``region`` on the grid with the specified value for the solid flag.
|
||||
使用指定的值填充网格上 ``region`` 区域的实心标志。
|
||||
|
||||
\ **Note:** Calling :ref:`update<class_AStarGrid2D_method_update>` is not needed after the call of this function.
|
||||
\ **注意:**\ 调用该函数后不需要调用 :ref:`update<class_AStarGrid2D_method_update>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -464,9 +464,9 @@ Fills the given ``region`` on the grid with the specified value for the solid fl
|
||||
|
||||
void **fill_weight_scale_region** **(** :ref:`Rect2i<class_Rect2i>` region, :ref:`float<class_float>` weight_scale **)**
|
||||
|
||||
Fills the given ``region`` on the grid with the specified value for the weight scale.
|
||||
使用指定的值填充网格上 ``region`` 区域的权重缩放。
|
||||
|
||||
\ **Note:** Calling :ref:`update<class_AStarGrid2D_method_update>` is not needed after the call of this function.
|
||||
\ **注意:**\ 调用该函数后不需要调用 :ref:`update<class_AStarGrid2D_method_update>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -490,9 +490,9 @@ Fills the given ``region`` on the grid with the specified value for the weight s
|
||||
|
||||
:ref:`PackedVector2Array<class_PackedVector2Array>` **get_point_path** **(** :ref:`Vector2i<class_Vector2i>` from_id, :ref:`Vector2i<class_Vector2i>` to_id **)**
|
||||
|
||||
返回一个数组,其中包含 AStarGrid2D 在给定点之间找到的路径上的点。数组从路径的起点到终点排序。
|
||||
返回一个数组,其中包含 **AStarGrid2D** 在给定点之间找到的路径上的点。数组从路径的起点到终点排序。
|
||||
|
||||
\ **注意:**\ 该方法不是线程安全的。如果从 :ref:`Thread<class_Thread>` 中调用它,它将返回一个空的 :ref:`PackedVector3Array<class_PackedVector3Array>` 并打印一个错误消息。
|
||||
\ **注意:**\ 该方法不是线程安全的。如果从 :ref:`Thread<class_Thread>` 中调用它,它将返回一个空的 :ref:`PackedVector3Array<class_PackedVector3Array>` 并打印一条错误消息。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -540,7 +540,7 @@ Fills the given ``region`` on the grid with the specified value for the weight s
|
||||
|
||||
:ref:`bool<class_bool>` **is_in_bounds** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const|
|
||||
|
||||
如果 ``x`` 和 ``y`` 是有效的网格坐标(ID),则返回 ``true``\ 。
|
||||
如果 ``x`` 和 ``y`` 是有效的网格坐标(ID),即如果它位于 :ref:`region<class_AStarGrid2D_property_region>` 内部,则返回 ``true``\ 。相当于 ``region.has_point(Vector2i(x, y))``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -552,7 +552,7 @@ Fills the given ``region`` on the grid with the specified value for the weight s
|
||||
|
||||
:ref:`bool<class_bool>` **is_in_boundsv** **(** :ref:`Vector2i<class_Vector2i>` id **)** |const|
|
||||
|
||||
如果 ``id`` 向量是有效的网格坐标,则返回 ``true``\ 。
|
||||
如果 ``id`` 向量是有效的网格坐标,即如果它位于 :ref:`region<class_AStarGrid2D_property_region>` 内部,则返回 ``true``\ 。相当于 ``region.has_point(id)``\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -590,7 +590,7 @@ void **set_point_solid** **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`bool<cl
|
||||
|
||||
void **set_point_weight_scale** **(** :ref:`Vector2i<class_Vector2i>` id, :ref:`float<class_float>` weight_scale **)**
|
||||
|
||||
为具有给定 ``id`` 的点设置 ``weight_scale``\ 。在确定从相邻点到该点穿越路段的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStarGrid2D_method__compute_cost>` 的结果。
|
||||
为具有给定 ``id`` 的点设置 ``weight_scale``\ 。在确定从相邻点到该点穿越路段的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost<class_AStarGrid2D_private_method__compute_cost>` 的结果。
|
||||
|
||||
\ **注意:**\ 调用该函数后不需要调用 :ref:`update<class_AStarGrid2D_method_update>`\ 。
|
||||
|
||||
@@ -608,10 +608,10 @@ void **update** **(** **)**
|
||||
|
||||
\ **注意:**\ 会清空所有点的数据(坚固以及权重比例)。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AtlasTexture
|
||||
============
|
||||
|
||||
**Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
裁剪其他 Texture2D 的纹理。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
:ref:`Texture2D<class_Texture2D>` 资源,只绘制其 :ref:`atlas<class_AtlasTexture_property_atlas>` 纹理中的由 :ref:`region<class_AtlasTexture_property_region>` 所定义的那部分。还可以设置一个额外的 :ref:`margin<class_AtlasTexture_property_margin>`\ ,这对于小的调整很有用。
|
||||
|
||||
@@ -27,8 +27,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -51,8 +51,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AtlasTexture_property_atlas:
|
||||
|
||||
@@ -118,10 +118,10 @@ Property Descriptions
|
||||
|
||||
用于绘制 :ref:`atlas<class_AtlasTexture_property_atlas>` 的区域。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioBusLayout
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
存储有关音频总线的信息。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
存储位置、静音、独奏、旁通、效果、效果位置、音量以及总线之间的连接。使用方法见 :ref:`AudioServer<class_AudioServer>` 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,37 +10,37 @@
|
||||
AudioEffect
|
||||
===========
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioEffectAmplify<class_AudioEffectAmplify>`, :ref:`AudioEffectCapture<class_AudioEffectCapture>`, :ref:`AudioEffectChorus<class_AudioEffectChorus>`, :ref:`AudioEffectCompressor<class_AudioEffectCompressor>`, :ref:`AudioEffectDelay<class_AudioEffectDelay>`, :ref:`AudioEffectDistortion<class_AudioEffectDistortion>`, :ref:`AudioEffectEQ<class_AudioEffectEQ>`, :ref:`AudioEffectFilter<class_AudioEffectFilter>`, :ref:`AudioEffectLimiter<class_AudioEffectLimiter>`, :ref:`AudioEffectPanner<class_AudioEffectPanner>`, :ref:`AudioEffectPhaser<class_AudioEffectPhaser>`, :ref:`AudioEffectPitchShift<class_AudioEffectPitchShift>`, :ref:`AudioEffectRecord<class_AudioEffectRecord>`, :ref:`AudioEffectReverb<class_AudioEffectReverb>`, :ref:`AudioEffectSpectrumAnalyzer<class_AudioEffectSpectrumAnalyzer>`, :ref:`AudioEffectStereoEnhance<class_AudioEffectStereoEnhance>`
|
||||
**派生:** :ref:`AudioEffectAmplify<class_AudioEffectAmplify>`, :ref:`AudioEffectCapture<class_AudioEffectCapture>`, :ref:`AudioEffectChorus<class_AudioEffectChorus>`, :ref:`AudioEffectCompressor<class_AudioEffectCompressor>`, :ref:`AudioEffectDelay<class_AudioEffectDelay>`, :ref:`AudioEffectDistortion<class_AudioEffectDistortion>`, :ref:`AudioEffectEQ<class_AudioEffectEQ>`, :ref:`AudioEffectFilter<class_AudioEffectFilter>`, :ref:`AudioEffectLimiter<class_AudioEffectLimiter>`, :ref:`AudioEffectPanner<class_AudioEffectPanner>`, :ref:`AudioEffectPhaser<class_AudioEffectPhaser>`, :ref:`AudioEffectPitchShift<class_AudioEffectPitchShift>`, :ref:`AudioEffectRecord<class_AudioEffectRecord>`, :ref:`AudioEffectReverb<class_AudioEffectReverb>`, :ref:`AudioEffectSpectrumAnalyzer<class_AudioEffectSpectrumAnalyzer>`, :ref:`AudioEffectStereoEnhance<class_AudioEffectStereoEnhance>`
|
||||
|
||||
用于音频的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
音频总线的基础资源。在该资源所应用的总线上应用音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `音频麦克风录音演示 <https://godotengine.org/asset-library/asset/527>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------------+----------------------------------------------------------------------------------+
|
||||
| :ref:`AudioEffectInstance<class_AudioEffectInstance>` | :ref:`_instantiate<class_AudioEffect_method__instantiate>` **(** **)** |virtual| |
|
||||
+-------------------------------------------------------+----------------------------------------------------------------------------------+
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioEffectInstance<class_AudioEffectInstance>` | :ref:`_instantiate<class_AudioEffect_private_method__instantiate>` **(** **)** |virtual| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -48,10 +48,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffect_method__instantiate:
|
||||
.. _class_AudioEffect_private_method__instantiate:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -59,12 +59,12 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectAmplify
|
||||
==================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个放大的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
增加或减少通过音频总线传送的音量。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -46,8 +46,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectAmplify_property_volume_db:
|
||||
|
||||
@@ -62,10 +62,10 @@ Property Descriptions
|
||||
|
||||
以分贝为单位的放大量。正值使声音更响亮,负值使声音更安静。数值范围从 -80 到 24。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectBandLimitFilter
|
||||
==========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加一个带限滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
限制 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 周围范围内的频率,允许这个范围外的频率通过。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectBandPassFilter
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加一个带通滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
衰减 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 周围范围内的频率,并切断这个频段之外的频率。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioEffectCapture
|
||||
==================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
从音频总线上实时捕捉音频。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
AudioEffectCapture 是一种 AudioEffect,可将所有音频帧从附加的音频效果总线复制到其内部的环形缓冲区中。
|
||||
|
||||
@@ -27,8 +27,8 @@ AudioEffectCapture 是一种 AudioEffect,可将所有音频帧从附加的音
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
@@ -36,8 +36,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -48,8 +48,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -76,8 +76,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectCapture_property_buffer_length:
|
||||
|
||||
@@ -98,8 +98,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectCapture_method_can_get_buffer:
|
||||
|
||||
@@ -183,10 +183,10 @@ void **clear_buffer** **(** **)**
|
||||
|
||||
返回从音频总线插入的音频帧的数量。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectChorus
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
添加合唱音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
添加一个合唱音频效果。该效果复制音频源,并应用声音滤波器进行操作。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -94,8 +94,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -132,8 +132,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectChorus_property_dry:
|
||||
|
||||
@@ -596,8 +596,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectChorus_method_get_voice_cutoff_hz:
|
||||
|
||||
@@ -607,7 +607,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -621,7 +621,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -635,7 +635,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -649,7 +649,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -663,7 +663,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -677,7 +677,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -691,7 +691,7 @@ void **set_voice_cutoff_hz** **(** :ref:`int<class_int>` voice_idx, :ref:`float<
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -705,7 +705,7 @@ void **set_voice_delay_ms** **(** :ref:`int<class_int>` voice_idx, :ref:`float<c
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -719,7 +719,7 @@ void **set_voice_depth_ms** **(** :ref:`int<class_int>` voice_idx, :ref:`float<c
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -733,7 +733,7 @@ void **set_voice_level_db** **(** :ref:`int<class_int>` voice_idx, :ref:`float<c
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -747,7 +747,7 @@ void **set_voice_pan** **(** :ref:`int<class_int>` voice_idx, :ref:`float<class_
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -761,12 +761,12 @@ void **set_voice_rate_hz** **(** :ref:`int<class_int>` voice_idx, :ref:`float<cl
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectCompressor
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加压缩音频效果。
|
||||
|
||||
@@ -18,8 +18,8 @@ AudioEffectCompressor
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
动态范围压缩器在振幅超过一定的阈值(以分贝为单位)时,降低声音的电平。压缩器的主要用途之一是通过尽可能少的削波(当声音超过 0dB 时)来增加动态范围。
|
||||
|
||||
@@ -35,15 +35,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -70,8 +70,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectCompressor_property_attack_us:
|
||||
|
||||
@@ -188,10 +188,10 @@ Property Descriptions
|
||||
|
||||
超过该电平,压缩将应用于音频。值的范围可以从 -60 到 0。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectDelay
|
||||
================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加延迟音频效果。在一段时间后回放输入信号。
|
||||
|
||||
@@ -18,22 +18,22 @@ AudioEffectDelay
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
在一段时间后回放输入信号。延迟的信号可以多次回放,以产生重复、衰减的回声。延迟效果的范围是从微弱回声效果到明显的以前声音和新声音的混合。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -72,8 +72,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectDelay_property_dry:
|
||||
|
||||
@@ -137,7 +137,7 @@ Property Descriptions
|
||||
- void **set_feedback_level_db** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_feedback_level_db** **(** **)**
|
||||
|
||||
Sound level for feedback.
|
||||
反馈的声级。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -171,7 +171,7 @@ Sound level for feedback.
|
||||
- void **set_tap1_active** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_tap1_active** **(** **)**
|
||||
|
||||
If ``true``, the first tap will be enabled.
|
||||
如果为 ``true``\ ,将启用第一拍。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -188,7 +188,7 @@ If ``true``, the first tap will be enabled.
|
||||
- void **set_tap1_delay_ms** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap1_delay_ms** **(** **)**
|
||||
|
||||
First tap delay time in milliseconds.
|
||||
第一拍延迟时间,单位为毫秒。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -205,7 +205,7 @@ First tap delay time in milliseconds.
|
||||
- void **set_tap1_level_db** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap1_level_db** **(** **)**
|
||||
|
||||
Sound level for the first tap.
|
||||
第一拍的声级。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -222,7 +222,7 @@ Sound level for the first tap.
|
||||
- void **set_tap1_pan** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap1_pan** **(** **)**
|
||||
|
||||
Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right).
|
||||
第一拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -239,7 +239,7 @@ Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully
|
||||
- void **set_tap2_active** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **is_tap2_active** **(** **)**
|
||||
|
||||
If ``true``, the second tap will be enabled.
|
||||
如果为 ``true``\ ,将启用第二拍。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -256,7 +256,7 @@ If ``true``, the second tap will be enabled.
|
||||
- void **set_tap2_delay_ms** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap2_delay_ms** **(** **)**
|
||||
|
||||
Second tap delay time in milliseconds.
|
||||
第二拍的延迟时间,单位为毫秒。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -273,7 +273,7 @@ Second tap delay time in milliseconds.
|
||||
- void **set_tap2_level_db** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap2_level_db** **(** **)**
|
||||
|
||||
Sound level for the second tap.
|
||||
第二拍的声级。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -290,12 +290,12 @@ Sound level for the second tap.
|
||||
- void **set_tap2_pan** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_tap2_pan** **(** **)**
|
||||
|
||||
Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right).
|
||||
第二拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectDistortion
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加失真音频效果。
|
||||
|
||||
@@ -18,8 +18,8 @@ AudioEffectDistortion
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可以使用不同的类型:削波、正切、低保真(位破碎)、过载、波形。
|
||||
|
||||
@@ -27,15 +27,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -58,8 +58,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioEffectDistortion_Mode:
|
||||
|
||||
@@ -113,8 +113,8 @@ enum **Mode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectDistortion_property_drive:
|
||||
|
||||
@@ -197,10 +197,10 @@ Property Descriptions
|
||||
|
||||
在效果前增加或减少的音量,单位为分贝。取值范围从 -60 到 60。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
AudioEffectEQ
|
||||
=============
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioEffectEQ10<class_AudioEffectEQ10>`, :ref:`AudioEffectEQ21<class_AudioEffectEQ21>`, :ref:`AudioEffectEQ6<class_AudioEffectEQ6>`
|
||||
**派生:** :ref:`AudioEffectEQ10<class_AudioEffectEQ10>`, :ref:`AudioEffectEQ21<class_AudioEffectEQ21>`, :ref:`AudioEffectEQ6<class_AudioEffectEQ6>`
|
||||
|
||||
音频均衡器的基类。让你可以控制频率。
|
||||
|
||||
@@ -20,22 +20,22 @@ AudioEffectEQ
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
AudioEffectEQ 可用于频率控制。用它来弥补音频中不足之处。AudioEffectEQ 在 Master 总线上很有用,可以完全掌控一个混音,并赋予它更多的特性。当游戏在移动设备上运行时,它们也很有用,可以根据那种扬声器来调整混音(可以被添加,但在插入耳机时禁用)。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -54,8 +54,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectEQ_method_get_band_count:
|
||||
|
||||
@@ -89,10 +89,10 @@ void **set_band_gain_db** **(** :ref:`int<class_int>` band_idx, :ref:`float<clas
|
||||
|
||||
设置指定索引处的波段增益,单位为 dB。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectEQ10
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加 10 段均衡器音频效果。让你控制 31Hz 到 16000Hz 的频率。
|
||||
|
||||
@@ -18,8 +18,8 @@ AudioEffectEQ10
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
频段:
|
||||
|
||||
@@ -47,15 +47,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectEQ21
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个 21 频段均衡器音频效果。可以控制从 22 Hz 到 22000 Hz 的频率。
|
||||
|
||||
@@ -18,8 +18,8 @@ AudioEffectEQ21
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
频段:
|
||||
|
||||
@@ -69,15 +69,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectEQ6
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectEQ<class_AudioEffectEQ>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个 6 频段均衡器音频效果。可以控制从 32 Hz 到 10000 Hz 的频率。
|
||||
|
||||
@@ -18,8 +18,8 @@ AudioEffectEQ6
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
频段:
|
||||
|
||||
@@ -39,15 +39,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
AudioEffectFilter
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioEffectBandLimitFilter<class_AudioEffectBandLimitFilter>`, :ref:`AudioEffectBandPassFilter<class_AudioEffectBandPassFilter>`, :ref:`AudioEffectHighPassFilter<class_AudioEffectHighPassFilter>`, :ref:`AudioEffectHighShelfFilter<class_AudioEffectHighShelfFilter>`, :ref:`AudioEffectLowPassFilter<class_AudioEffectLowPassFilter>`, :ref:`AudioEffectLowShelfFilter<class_AudioEffectLowShelfFilter>`, :ref:`AudioEffectNotchFilter<class_AudioEffectNotchFilter>`
|
||||
**派生:** :ref:`AudioEffectBandLimitFilter<class_AudioEffectBandLimitFilter>`, :ref:`AudioEffectBandPassFilter<class_AudioEffectBandPassFilter>`, :ref:`AudioEffectHighPassFilter<class_AudioEffectHighPassFilter>`, :ref:`AudioEffectHighShelfFilter<class_AudioEffectHighShelfFilter>`, :ref:`AudioEffectLowPassFilter<class_AudioEffectLowPassFilter>`, :ref:`AudioEffectLowShelfFilter<class_AudioEffectLowShelfFilter>`, :ref:`AudioEffectNotchFilter<class_AudioEffectNotchFilter>`
|
||||
|
||||
为音频总线添加一个滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
允许通过 :ref:`cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 以外的频率。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -54,8 +54,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioEffectFilter_FilterDB:
|
||||
|
||||
@@ -101,8 +101,8 @@ enum **FilterDB**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectFilter_property_cutoff_hz:
|
||||
|
||||
@@ -134,7 +134,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -170,10 +170,10 @@ Property Descriptions
|
||||
|
||||
在截断频率附近的频率范围内的提升量。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectHighPassFilter
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个高通滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
削减比 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 更低的频率,允许更高的频率通过。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectHighShelfFilter
|
||||
==========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个高架滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
降低所有高于 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 的频率。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,27 +10,27 @@
|
||||
AudioEffectInstance
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance<class_AudioEffectSpectrumAnalyzerInstance>`
|
||||
**派生:** :ref:`AudioEffectSpectrumAnalyzerInstance<class_AudioEffectSpectrumAnalyzerInstance>`
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个类的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_process<class_AudioEffectInstance_method__process>` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int<class_int>` frame_count **)** |virtual| |
|
||||
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_process_silence<class_AudioEffectInstance_method__process_silence>` **(** **)** |virtual| |const| |
|
||||
+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_process<class_AudioEffectInstance_private_method__process>` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int<class_int>` frame_count **)** |virtual| |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_process_silence<class_AudioEffectInstance_private_method__process_silence>` **(** **)** |virtual| |const| |
|
||||
+-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -38,10 +38,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectInstance_method__process:
|
||||
.. _class_AudioEffectInstance_private_method__process:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -49,13 +49,13 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioEffectInstance_method__process_silence:
|
||||
.. _class_AudioEffectInstance_private_method__process_silence:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -63,12 +63,12 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioEffectLimiter
|
||||
==================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加一个软剪辑限制器音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
限制器类似于压缩器,但灵活性较差,并且设计为不允许声音超过给定的 dB 阈值。始终建议在主总线中添加一个以减少削波的影响。
|
||||
|
||||
@@ -25,15 +25,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -54,8 +54,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectLimiter_property_ceiling_db:
|
||||
|
||||
@@ -104,7 +104,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -123,10 +123,10 @@ Property Descriptions
|
||||
|
||||
限制器开始生效的阈值,以分贝为单位。值的范围可以从 -30 到 0。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectLowPassFilter
|
||||
========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个低通滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
削减比 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 更低的频率,允许更高的频率通过。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectLowShelfFilter
|
||||
=========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个低架滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
降低 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 以下的所有频率。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectNotchFilter
|
||||
======================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectFilter<class_AudioEffectFilter>` **<** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在音频总线上添加一个陷波滤波器。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
衰减 :ref:`AudioEffectFilter.cutoff_hz<class_AudioEffectFilter_property_cutoff_hz>` 周围窄带的频率,并切断这个范围以外的频率。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectPanner
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个声像器音频效果。向左或向右声像移动声音。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
决定向左右总线发送的音频信号量。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -46,8 +46,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectPanner_property_pan:
|
||||
|
||||
@@ -62,10 +62,10 @@ Property Descriptions
|
||||
|
||||
声像位置。值的范围可以从 -1(完全左)到1(完全右)。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectPhaser
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个移相器音频效果。
|
||||
|
||||
@@ -18,22 +18,22 @@ AudioEffectPhaser
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
将相移信号与原始信号相结合。使用低频振荡器控制相移信号的移动。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -56,8 +56,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectPhaser_property_depth:
|
||||
|
||||
@@ -140,10 +140,10 @@ Property Descriptions
|
||||
|
||||
以 Hz 为单位调整效果在整个频率范围内上下扫描的速度。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
AudioEffectPitchShift
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
为音频总线添加音高变换的音频效果。
|
||||
|
||||
@@ -18,22 +18,22 @@ AudioEffectPitchShift
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
允许独立于速度调制音高。所有频率都可以增加或减少,而对瞬态的影响最小。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -52,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioEffectPitchShift_FFTSize:
|
||||
|
||||
@@ -115,8 +115,8 @@ enum **FFTSize**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectPitchShift_property_fft_size:
|
||||
|
||||
@@ -165,10 +165,10 @@ Property Descriptions
|
||||
|
||||
要使用的音高缩放。\ ``1.0`` 是默认的音高,声音会按原样播放。\ :ref:`pitch_scale<class_AudioEffectPitchShift_property_pitch_scale>` 的范围从 ``0.0``\ (无限低的音高,听不见)到 ``16``\ (比初始音高要高 16 倍)。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioEffectRecord
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用于录制来自音频总线的声音的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
允许用户录制来自音频总线的声音。在“Master”音频总线上使用时会包含所有 Godot 输出的音频。
|
||||
|
||||
@@ -27,8 +27,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用麦克风录音 <../tutorials/audio/recording_with_microphone>`
|
||||
|
||||
@@ -36,8 +36,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -48,8 +48,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -68,8 +68,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectRecord_property_format:
|
||||
|
||||
@@ -90,8 +90,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectRecord_method_get_recording:
|
||||
|
||||
@@ -125,10 +125,10 @@ void **set_recording_active** **(** :ref:`bool<class_bool>` record **)**
|
||||
|
||||
如果为 ``true``\ ,将录制声音。请注意,重新开始录音将移除先前录音的样本。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioEffectReverb
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
向音频总线添加一个混响音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
模拟房间、音乐厅、洞穴或开放空间等声学环境的声音。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
@@ -32,8 +32,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -62,8 +62,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectReverb_property_damping:
|
||||
|
||||
@@ -197,10 +197,10 @@ Property Descriptions
|
||||
|
||||
修改后声音的输出百分比。为 0 时,只输出原始声音。取值范围是 0 到 1。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioEffectSpectrumAnalyzer
|
||||
===========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
可用于实时音频可视化的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
这种音频效果不影响声音输出,但可以用于实时音频可视化。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `音频频谱演示 <https://godotengine.org/asset-library/asset/528>`__
|
||||
|
||||
@@ -34,8 +34,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -54,8 +54,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioEffectSpectrumAnalyzer_FFTSize:
|
||||
|
||||
@@ -117,8 +117,8 @@ enum **FFTSize**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectSpectrumAnalyzer_property_buffer_length:
|
||||
|
||||
@@ -167,12 +167,12 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
AudioEffectSpectrumAnalyzerInstance
|
||||
===================================
|
||||
|
||||
**Inherits:** :ref:`AudioEffectInstance<class_AudioEffectInstance>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffectInstance<class_AudioEffectInstance>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个类的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -34,8 +34,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioEffectSpectrumAnalyzerInstance_MagnitudeMode:
|
||||
|
||||
@@ -65,8 +65,8 @@ enum **MagnitudeMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectSpectrumAnalyzerInstance_method_get_magnitude_for_frequency_range:
|
||||
|
||||
@@ -76,12 +76,12 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
AudioEffectStereoEnhance
|
||||
========================
|
||||
|
||||
**Inherits:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioEffect<class_AudioEffect>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
一种可用于调整立体声声像强度的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一种可用于调整立体声声像强度的音频效果。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -50,8 +50,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioEffectStereoEnhance_property_pan_pullout:
|
||||
|
||||
@@ -83,7 +83,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -102,12 +102,12 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioListener2D
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
覆盖听到声音的位置。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一旦被添加到场景树并使用 :ref:`make_current<class_AudioListener2D_method_make_current>` 启用,此节点将覆盖听到声音的位置。只有一个 **AudioListener2D** 可以是当前的。使用 :ref:`make_current<class_AudioListener2D_method_make_current>` 将禁用之前的 **AudioListener2D**\ 。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -45,8 +45,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioListener2D_method_clear_current:
|
||||
|
||||
@@ -82,10 +82,10 @@ void **make_current** **(** **)**
|
||||
|
||||
如果 **AudioListener2D** 未添加到 :ref:`SceneTree<class_SceneTree>`\ ,则该方法无效。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioListener3D
|
||||
===============
|
||||
|
||||
**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
覆盖听到声音的位置。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
一旦添加到场景树并使用 :ref:`make_current<class_AudioListener3D_method_make_current>` 启用,该节点将覆盖听到声音的位置。这可用于从与 :ref:`Camera3D<class_Camera3D>` 不同的位置聆听。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -45,8 +45,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioListener3D_method_clear_current:
|
||||
|
||||
@@ -94,10 +94,10 @@ void **make_current** **(** **)**
|
||||
|
||||
启用该监听器。将覆盖当前相机的监听器。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioServer
|
||||
===========
|
||||
|
||||
**Inherits:** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Object<class_Object>`
|
||||
|
||||
低级音频访问的服务器接口。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AudioServer** 是用于音频访问的底层服务器接口。它负责创建样本数据(可播放的音频)以及通过语音接口进行播放。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频总线 <../tutorials/audio/audio_buses>`
|
||||
|
||||
@@ -36,8 +36,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -54,8 +54,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -146,8 +146,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AudioServer_signal_bus_layout_changed:
|
||||
|
||||
@@ -155,7 +155,7 @@ Signals
|
||||
|
||||
**bus_layout_changed** **(** **)**
|
||||
|
||||
Emitted when an audio bus is added, deleted, or moved.
|
||||
添加、修改、删除音频总线时发出。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -167,7 +167,7 @@ Emitted when an audio bus is added, deleted, or moved.
|
||||
|
||||
**bus_renamed** **(** :ref:`int<class_int>` bus_index, :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` new_name **)**
|
||||
|
||||
Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``new_name``.
|
||||
当索引为 ``bus_index`` 的音频总线的名称从 ``old_name`` 更改为 ``new_name`` 时发出。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -175,8 +175,8 @@ Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``ne
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioServer_SpeakerMode:
|
||||
|
||||
@@ -222,8 +222,8 @@ enum **SpeakerMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioServer_property_bus_count:
|
||||
|
||||
@@ -297,8 +297,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioServer_method_add_bus:
|
||||
|
||||
@@ -500,9 +500,9 @@ void **add_bus_effect** **(** :ref:`int<class_int>` bus_idx, :ref:`AudioEffect<c
|
||||
|
||||
:ref:`float<class_float>` **get_output_latency** **(** **)** |const|
|
||||
|
||||
Returns the audio driver's effective output latency. This is based on :ref:`ProjectSettings.audio/driver/output_latency<class_ProjectSettings_property_audio/driver/output_latency>`, but the exact returned value will differ depending on the operating system and audio driver.
|
||||
返回音频驱动的实际输出延迟。基于 :ref:`ProjectSettings.audio/driver/output_latency<class_ProjectSettings_property_audio/driver/output_latency>`\ ,但实际的返回值取决于操作系统和音频驱动。
|
||||
|
||||
\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency<class_AudioServer_method_get_output_latency>` every frame.
|
||||
\ **注意:**\ 可能开销较大;不建议每帧都调用 :ref:`get_output_latency<class_AudioServer_method_get_output_latency>`\ 。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -746,7 +746,7 @@ void **set_enable_tagging_used_audio_streams** **(** :ref:`bool<class_bool>` ena
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -772,10 +772,10 @@ void **unlock** **(** **)**
|
||||
|
||||
解锁音频驱动程序的主循环。(锁定后,你始终需要手动解锁它。)
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
AudioStream
|
||||
===========
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`, :ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>`, :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, :ref:`AudioStreamWAV<class_AudioStreamWAV>`
|
||||
**派生:** :ref:`AudioStreamGenerator<class_AudioStreamGenerator>`, :ref:`AudioStreamMicrophone<class_AudioStreamMicrophone>`, :ref:`AudioStreamMP3<class_AudioStreamMP3>`, :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`, :ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>`, :ref:`AudioStreamRandomizer<class_AudioStreamRandomizer>`, :ref:`AudioStreamWAV<class_AudioStreamWAV>`
|
||||
|
||||
音频流的基类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
音频流的基类。音频流用于播放音效和音乐,支持 WAV(通过 :ref:`AudioStreamWAV<class_AudioStreamWAV>`\ )和 Ogg(通过 :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`\ )文件格式。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频流 <../tutorials/audio/audio_streams>`
|
||||
|
||||
@@ -38,31 +38,31 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_get_beat_count<class_AudioStream_method__get_beat_count>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_bpm<class_AudioStream_method__get_bpm>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_length<class_AudioStream_method__get_length>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`_get_stream_name<class_AudioStream_method__get_stream_name>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`_instantiate_playback<class_AudioStream_method__instantiate_playback>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_method__is_monophonic>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` **(** **)** |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>` **(** **)** |const| |
|
||||
+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_get_beat_count<class_AudioStream_private_method__get_beat_count>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_bpm<class_AudioStream_private_method__get_bpm>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_length<class_AudioStream_private_method__get_length>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`String<class_String>` | :ref:`_get_stream_name<class_AudioStream_private_method__get_stream_name>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`_instantiate_playback<class_AudioStream_private_method__instantiate_playback>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_monophonic<class_AudioStream_private_method__is_monophonic>` **(** **)** |virtual| |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`get_length<class_AudioStream_method_get_length>` **(** **)** |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` | :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` **(** **)** |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_monophonic<class_AudioStream_method_is_monophonic>` **(** **)** |const| |
|
||||
+-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -70,10 +70,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStream_method__get_beat_count:
|
||||
.. _class_AudioStream_private_method__get_beat_count:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -81,13 +81,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStream_method__get_bpm:
|
||||
.. _class_AudioStream_private_method__get_bpm:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -95,13 +95,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStream_method__get_length:
|
||||
.. _class_AudioStream_private_method__get_length:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -109,13 +109,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStream_method__get_stream_name:
|
||||
.. _class_AudioStream_private_method__get_stream_name:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -123,13 +123,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStream_method__instantiate_playback:
|
||||
.. _class_AudioStream_private_method__instantiate_playback:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -137,13 +137,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStream_method__is_monophonic:
|
||||
.. _class_AudioStream_private_method__is_monophonic:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -151,7 +151,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -175,7 +175,7 @@ Method Descriptions
|
||||
|
||||
:ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **instantiate_playback** **(** **)**
|
||||
|
||||
返回一个 AudioStreamPlayback。当想要扩展 :ref:`_instantiate_playback<class_AudioStream_method__instantiate_playback>`\ ,但从一个内部持有的 AudioStream 子资源调用 :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` 时很有用。在 ``AudioStreamRandomPitch::instantiate_playback`` 的源文件中可以找到这方面的示例。
|
||||
返回一个 AudioStreamPlayback。当想要扩展 :ref:`_instantiate_playback<class_AudioStream_private_method__instantiate_playback>`\ ,但从一个内部持有的 AudioStream 子资源调用 :ref:`instantiate_playback<class_AudioStream_method_instantiate_playback>` 时很有用。在 ``AudioStreamRandomPitch::instantiate_playback`` 的源文件中可以找到这方面的示例。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -189,10 +189,10 @@ Method Descriptions
|
||||
|
||||
如果该音频流仅支持单声道播放,则返回 true;如果音频流支持复调,则返回 false。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,20 +10,23 @@
|
||||
AudioStreamGenerator
|
||||
====================
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
提供程序式声音生成工具的音频流。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**AudioStreamGenerator** 是一种音频流,它自己并不播放声音,而是要用脚本来为它生成音频数据。另见 :ref:`AudioStreamGeneratorPlayback<class_AudioStreamGeneratorPlayback>`\ 。
|
||||
|
||||
以下是用它来生成正弦波的例子:
|
||||
|
||||
::
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. code-tab:: gdscript
|
||||
|
||||
var playback # 存放 AudioStreamGeneratorPlayback。
|
||||
@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate
|
||||
@@ -43,6 +46,40 @@ Description
|
||||
playback.push_frame(Vector2.ONE * sin(phase * TAU))
|
||||
phase = fmod(phase + increment, 1.0)
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
[Export] public AudioStreamPlayer Player { get; set; }
|
||||
|
||||
private AudioStreamGeneratorPlayback _playback; // 存放 AudioStreamGeneratorPlayback。
|
||||
private float _sampleHz;
|
||||
private float _pulseHz = 440.0f; // 音频波形的频率。
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if (Player.Stream is AudioStreamGenerator generator) // Type as a generator to access MixRate.
|
||||
{
|
||||
_sampleHz = generator.MixRate;
|
||||
Player.Play();
|
||||
_playback = (AudioStreamGeneratorPlayback)Player.GetStreamPlayback();
|
||||
FillBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
public void FillBuffer()
|
||||
{
|
||||
double phase = 0.0;
|
||||
float increment = _pulseHz / _sampleHz;
|
||||
int framesAvailable = _playback.GetFramesAvailable();
|
||||
|
||||
for (int i = 0; i < framesAvailable; i++)
|
||||
{
|
||||
_playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau));
|
||||
phase = Mathf.PosMod(phase + increment, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
上面的例子中,“AudioStreamPlayer”节点必须使用 **AudioStreamGenerator** 作为其流。\ ``fill_buffer`` 函数负责提供模拟正弦波的音频数据。
|
||||
|
||||
要执行实时音频频谱分析,见 :ref:`AudioEffectSpectrumAnalyzer<class_AudioEffectSpectrumAnalyzer>`\ 。
|
||||
@@ -51,15 +88,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `音频生成器演示 <https://godotengine.org/asset-library/asset/526>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -76,8 +113,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamGenerator_property_buffer_length:
|
||||
|
||||
@@ -113,10 +150,10 @@ Property Descriptions
|
||||
|
||||
根据\ `奈奎斯特–香农采样定理 <https://zh.wikipedia.org/wiki/%E9%87%87%E6%A0%B7%E5%AE%9A%E7%90%86>`__\ ,当超过 40000 赫兹时,人类的听觉没有质量上的差别(因为大多数人最多只能听到 ~20000 赫兹,往往更少)。如果你要生成语音等音高较低的声音,则可以使用 ``32000`` 或 ``22050`` 等较低的采样率,不会降低质量。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioStreamGeneratorPlayback
|
||||
============================
|
||||
|
||||
**Inherits:** :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>` **<** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>` **<** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
播放使用 :ref:`AudioStreamGenerator<class_AudioStreamGenerator>` 生成的音频。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
此类旨在与 :ref:`AudioStreamGenerator<class_AudioStreamGenerator>` 一起使用以实时播放生成的音频。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `音频生成器演示 <https://godotengine.org/asset-library/asset/526>`__
|
||||
|
||||
@@ -32,8 +32,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -58,8 +58,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamGeneratorPlayback_method_can_push_buffer:
|
||||
|
||||
@@ -103,9 +103,7 @@ void **clear_buffer** **(** **)**
|
||||
|
||||
:ref:`int<class_int>` **get_skips** **(** **)** |const|
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
返回由于音频样本数据中缓冲区不足而导致播放跳过的次数。该值在播放开始时重置。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -131,10 +129,10 @@ void **clear_buffer** **(** **)**
|
||||
|
||||
将单个音频数据帧推送到缓冲区。这通常比 C# 中的以及通过 GDExtension 编译的语言中的 :ref:`push_buffer<class_AudioStreamGeneratorPlayback_method_push_buffer>` 效率更低,但在 GDScript 中的 :ref:`push_frame<class_AudioStreamGeneratorPlayback_method_push_frame>` 的效率可能\ *更高*\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioStreamMicrophone
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
播放实时音频输入数据。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
当直接在 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>` 节点中使用时,\ **AudioStreamMicrophone** 会实时播放麦克风的输入。这可以配合 :ref:`AudioEffectCapture<class_AudioEffectCapture>` 使用,以处理数据或保存数据。
|
||||
|
||||
@@ -25,17 +25,17 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`使用麦克风录音 <../tutorials/audio/recording_with_microphone>`
|
||||
|
||||
- `音频麦克风录音演示 <https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record>`__
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioStreamMP3
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
MP3 音频流驱动程序。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
MP3 音频流驱动程序。如果要在运行时加载 MP3 文件,请参阅 :ref:`data<class_AudioStreamMP3_property_data>`\ 。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -49,8 +49,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamMP3_property_bar_beats:
|
||||
|
||||
@@ -65,7 +65,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -84,7 +84,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -103,7 +103,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -181,10 +181,10 @@ Property Descriptions
|
||||
|
||||
循环时,流开始的时间,单位为秒。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,28 @@
|
||||
AudioStreamOggVorbis
|
||||
====================
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
A class representing an Ogg Vorbis audio stream.
|
||||
代表 Ogg Vorbis 音频流的类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
The AudioStreamOggVorbis class is a specialized :ref:`AudioStream<class_AudioStream>` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the :ref:`AudioStreamWAV<class_AudioStreamWAV>` class.
|
||||
AudioStreamOggVorbis 类是专用于处理 Ogg Vorbis 文件格式的 :ref:`AudioStream<class_AudioStream>` 类。它提供加载和播放 Ogg Vorbis 文件以及管理循环和其他播放属性的功能。该类是音频流系统的一部分,该系统还通过 :ref:`AudioStreamWAV<class_AudioStreamWAV>` 类支持 WAV 系统。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -45,8 +52,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -63,8 +70,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamOggVorbis_property_bar_beats:
|
||||
|
||||
@@ -79,7 +86,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -98,7 +105,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -117,7 +124,7 @@ Property Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -134,7 +141,7 @@ Property Descriptions
|
||||
- void **set_loop** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **has_loop** **(** **)**
|
||||
|
||||
If ``true``, the audio will play again from the specified :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` once it is done playing. Useful for ambient sounds and background music.
|
||||
如果为 ``true``\ ,则音频播放完成后将从 :ref:`loop_offset<class_AudioStreamOggVorbis_property_loop_offset>` 指定的位置再次播放。可用于环境声音和背景音乐。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -176,8 +183,8 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset<clas
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamOggVorbis_method_load_from_buffer:
|
||||
|
||||
@@ -185,7 +192,7 @@ Method Descriptions
|
||||
|
||||
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** |static|
|
||||
|
||||
Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data.
|
||||
从给定缓冲区创建一个新的 AudioStreamOggVorbis 实例。缓冲区必须包含 Ogg Vorbis 数据。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -197,12 +204,12 @@ Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer mu
|
||||
|
||||
:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_file** **(** :ref:`String<class_String>` path **)** |static|
|
||||
|
||||
Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format.
|
||||
从给定文件路径创建新的 AudioStreamOggVorbis 实例。文件必须采用 Ogg Vorbis 格式。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,51 +10,51 @@
|
||||
AudioStreamPlayback
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioStreamPlaybackPolyphonic<class_AudioStreamPlaybackPolyphonic>`, :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>`
|
||||
**派生:** :ref:`AudioStreamPlaybackPolyphonic<class_AudioStreamPlaybackPolyphonic>`, :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>`
|
||||
|
||||
播放音频的元类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
可以播放、循环播放、暂停滚动播放音频。有关用法,请参阅 :ref:`AudioStream<class_AudioStream>` 和 :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- `音频生成器演示 <https://godotengine.org/asset-library/asset/526>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_get_loop_count<class_AudioStreamPlayback_method__get_loop_count>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_playback_position<class_AudioStreamPlayback_method__get_playback_position>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_playing<class_AudioStreamPlayback_method__is_playing>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_mix<class_AudioStreamPlayback_method__mix>` **(** AudioFrame* buffer, :ref:`float<class_float>` rate_scale, :ref:`int<class_int>` frames **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_seek<class_AudioStreamPlayback_method__seek>` **(** :ref:`float<class_float>` position **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_start<class_AudioStreamPlayback_method__start>` **(** :ref:`float<class_float>` from_pos **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_stop<class_AudioStreamPlayback_method__stop>` **(** **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_tag_used_streams<class_AudioStreamPlayback_method__tag_used_streams>` **(** **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_get_loop_count<class_AudioStreamPlayback_private_method__get_loop_count>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_playback_position<class_AudioStreamPlayback_private_method__get_playback_position>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`_is_playing<class_AudioStreamPlayback_private_method__is_playing>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_mix<class_AudioStreamPlayback_private_method__mix>` **(** AudioFrame* buffer, :ref:`float<class_float>` rate_scale, :ref:`int<class_int>` frames **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_seek<class_AudioStreamPlayback_private_method__seek>` **(** :ref:`float<class_float>` position **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_start<class_AudioStreamPlayback_private_method__start>` **(** :ref:`float<class_float>` from_pos **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_stop<class_AudioStreamPlayback_private_method__stop>` **(** **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_tag_used_streams<class_AudioStreamPlayback_private_method__tag_used_streams>` **(** **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -62,10 +62,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayback_method__get_loop_count:
|
||||
.. _class_AudioStreamPlayback_private_method__get_loop_count:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -73,13 +73,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__get_playback_position:
|
||||
.. _class_AudioStreamPlayback_private_method__get_playback_position:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -87,13 +87,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__is_playing:
|
||||
.. _class_AudioStreamPlayback_private_method__is_playing:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -101,13 +101,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__mix:
|
||||
.. _class_AudioStreamPlayback_private_method__mix:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -115,13 +115,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__seek:
|
||||
.. _class_AudioStreamPlayback_private_method__seek:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -129,13 +129,13 @@ void **_seek** **(** :ref:`float<class_float>` position **)** |virtual|
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__start:
|
||||
.. _class_AudioStreamPlayback_private_method__start:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -143,13 +143,13 @@ void **_start** **(** :ref:`float<class_float>` from_pos **)** |virtual|
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__stop:
|
||||
.. _class_AudioStreamPlayback_private_method__stop:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -157,13 +157,13 @@ void **_stop** **(** **)** |virtual|
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayback_method__tag_used_streams:
|
||||
.. _class_AudioStreamPlayback_private_method__tag_used_streams:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -171,12 +171,12 @@ void **_tag_used_streams** **(** **)** |virtual|
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
AudioStreamPlaybackOggVorbis
|
||||
============================
|
||||
|
||||
**Inherits:** :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>` **<** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStreamPlaybackResampled<class_AudioStreamPlaybackResampled>` **<** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个类的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioStreamPlaybackPolyphonic
|
||||
=============================
|
||||
|
||||
**Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
:ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>` 的播放实例。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
:ref:`AudioStreamPolyphonic<class_AudioStreamPolyphonic>` 的播放实例。设置 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`\ 、\ :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>` 或 :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>` 的 ``stream`` 属性后,可以通过调用 :ref:`AudioStreamPlayer.get_stream_playback<class_AudioStreamPlayer_method_get_stream_playback>`\ 、\ :ref:`AudioStreamPlayer2D.get_stream_playback<class_AudioStreamPlayer2D_method_get_stream_playback>` 或 :ref:`AudioStreamPlayer3D.get_stream_playback<class_AudioStreamPlayer3D_method_get_stream_playback>` 方法获取播放实例。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -47,8 +47,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constants
|
||||
---------
|
||||
常量
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlaybackPolyphonic_constant_INVALID_ID:
|
||||
|
||||
@@ -64,8 +64,8 @@ Constants
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlaybackPolyphonic_method_is_stream_playing:
|
||||
|
||||
@@ -129,10 +129,10 @@ void **stop_stream** **(** :ref:`int<class_int>` stream **)**
|
||||
|
||||
停止某个流。\ ``stream`` 参数是由 :ref:`play_stream<class_AudioStreamPlaybackPolyphonic_method_play_stream>` 返回的整数 ID,在调用这个函数后失效。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,29 +10,29 @@
|
||||
AudioStreamPlaybackResampled
|
||||
============================
|
||||
|
||||
**Inherits:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStreamPlayback<class_AudioStreamPlayback>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`AudioStreamGeneratorPlayback<class_AudioStreamGeneratorPlayback>`, :ref:`AudioStreamPlaybackOggVorbis<class_AudioStreamPlaybackOggVorbis>`
|
||||
**派生:** :ref:`AudioStreamGeneratorPlayback<class_AudioStreamGeneratorPlayback>`, :ref:`AudioStreamPlaybackOggVorbis<class_AudioStreamPlaybackOggVorbis>`
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个类的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_stream_sampling_rate<class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_mix_resampled<class_AudioStreamPlaybackResampled_method__mix_resampled>` **(** AudioFrame* dst_buffer, :ref:`int<class_int>` frame_count **)** |virtual| |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`begin_resample<class_AudioStreamPlaybackResampled_method_begin_resample>` **(** **)** |
|
||||
+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`_get_stream_sampling_rate<class_AudioStreamPlaybackResampled_private_method__get_stream_sampling_rate>` **(** **)** |virtual| |const| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`_mix_resampled<class_AudioStreamPlaybackResampled_private_method__mix_resampled>` **(** AudioFrame* dst_buffer, :ref:`int<class_int>` frame_count **)** |virtual| |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`begin_resample<class_AudioStreamPlaybackResampled_method_begin_resample>` **(** **)** |
|
||||
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -40,10 +40,10 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate:
|
||||
.. _class_AudioStreamPlaybackResampled_private_method__get_stream_sampling_rate:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -51,13 +51,13 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlaybackResampled_method__mix_resampled:
|
||||
.. _class_AudioStreamPlaybackResampled_private_method__mix_resampled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -65,7 +65,7 @@ Method Descriptions
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -79,12 +79,12 @@ void **begin_resample** **(** **)**
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 <doc_updating_the_class_reference>`\ !
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioStreamPlayer
|
||||
=================
|
||||
|
||||
**Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
播放音频,不考虑所处位置。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
以非位置方式支持播放音频流。
|
||||
|
||||
@@ -25,8 +25,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频流 <../tutorials/audio/audio_streams>`
|
||||
|
||||
@@ -42,8 +42,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -70,8 +70,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -96,8 +96,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayer_signal_finished:
|
||||
|
||||
@@ -113,8 +113,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioStreamPlayer_MixTarget:
|
||||
|
||||
@@ -152,8 +152,8 @@ enum **MixTarget**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer_property_autoplay:
|
||||
|
||||
@@ -286,7 +286,7 @@ Property Descriptions
|
||||
- void **set_stream_paused** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **get_stream_paused** **(** **)**
|
||||
|
||||
如果为 ``true``\ ,则暂停播放。你可以通过将 ``stream_paused`` 设置为 ``false`` 来恢复播放。
|
||||
如果为 ``true``\ ,则播放会暂停。你可以通过将 :ref:`stream_paused<class_AudioStreamPlayer_property_stream_paused>` 设置为 ``false``\ 来恢复它。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -311,8 +311,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer_method_get_playback_position:
|
||||
|
||||
@@ -382,10 +382,10 @@ void **stop** **(** **)**
|
||||
|
||||
停止音频。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioStreamPlayer2D
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 2D 空间中播放与位置相关的声音。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
播放随与监听者的距离增大而衰减的音频。
|
||||
|
||||
@@ -29,15 +29,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频流 <../tutorials/audio/audio_streams>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -70,8 +70,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -96,8 +96,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayer2D_signal_finished:
|
||||
|
||||
@@ -113,8 +113,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer2D_property_area_mask:
|
||||
|
||||
@@ -298,7 +298,7 @@ Property Descriptions
|
||||
- void **set_stream_paused** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **get_stream_paused** **(** **)**
|
||||
|
||||
如果为 ``true``\ ,则暂停播放。你可以通过将 ``stream_paused`` 设置为 ``false`` 来恢复播放。
|
||||
如果为 ``true``\ ,则播放会暂停。你可以通过将 :ref:`stream_paused<class_AudioStreamPlayer2D_property_stream_paused>` 设置为 ``false``\ 来恢复它。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -323,8 +323,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer2D_method_get_playback_position:
|
||||
|
||||
@@ -394,10 +394,10 @@ void **stop** **(** **)**
|
||||
|
||||
停止音频。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioStreamPlayer3D
|
||||
===================
|
||||
|
||||
**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
在 3D 空间中播放与位置相关的声音。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
根据音频收听者的相对位置播放具有位置音效的音频。位置效应包括距离衰减、方向性、和多普勒效应。为了更逼真,低通滤波器会自动应用于远处的声音。这可以通过将 :ref:`attenuation_filter_cutoff_hz<class_AudioStreamPlayer3D_property_attenuation_filter_cutoff_hz>` 设置为 ``20500`` 来禁用。
|
||||
|
||||
@@ -29,15 +29,15 @@ Description
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`音频流 <../tutorials/audio/audio_streams>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -86,8 +86,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -112,8 +112,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_AudioStreamPlayer3D_signal_finished:
|
||||
|
||||
@@ -129,8 +129,8 @@ Signals
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioStreamPlayer3D_AttenuationModel:
|
||||
|
||||
@@ -210,8 +210,8 @@ enum **DopplerTracking**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer3D_property_area_mask:
|
||||
|
||||
@@ -396,7 +396,7 @@ Property Descriptions
|
||||
- void **set_max_db** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_max_db** **(** **)**
|
||||
|
||||
Sets the absolute maximum of the sound level, in decibels.
|
||||
设置声级的绝对最大值,以分贝为单位。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -556,8 +556,8 @@ Sets the absolute maximum of the sound level, in decibels.
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPlayer3D_method_get_playback_position:
|
||||
|
||||
@@ -627,10 +627,10 @@ void **stop** **(** **)**
|
||||
|
||||
停止音频。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
AudioStreamPolyphonic
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
音频流 AudioStream,允许用户从代码中随时播放自定义流,可以使用单个播放器同时播放。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
AudioStream 允许用户随时通过代码,同时使用单个播放器播放自定义流。
|
||||
|
||||
@@ -25,8 +25,8 @@ AudioStream 允许用户随时通过代码,同时使用单个播放器播放
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -41,8 +41,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamPolyphonic_property_polyphony:
|
||||
|
||||
@@ -57,10 +57,10 @@ Property Descriptions
|
||||
|
||||
可以同时播放的流的最大数量。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
AudioStreamRandomizer
|
||||
=====================
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
用音高和音量偏移,包装一个音频流池。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
根据播放模式,从池中随机选择一个 AudioStream,并在播放期间应用随机音高偏移和音量偏移。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -41,8 +41,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -69,8 +69,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioStreamRandomizer_PlaybackMode:
|
||||
|
||||
@@ -108,8 +108,8 @@ enum **PlaybackMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamRandomizer_property_playback_mode:
|
||||
|
||||
@@ -181,8 +181,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamRandomizer_method_add_stream:
|
||||
|
||||
@@ -264,10 +264,10 @@ void **set_stream_probability_weight** **(** :ref:`int<class_int>` index, :ref:`
|
||||
|
||||
设置流在指定索引处的概率权重。该值越高,随机化器在随机播放模式下选择该流的可能性就越大。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,30 @@
|
||||
AudioStreamWAV
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`AudioStream<class_AudioStream>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
存储从 WAV 文件加载的音频数据。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
AudioStreamWAV 存储从 WAV 文件加载的声音样本。要播放存储的声音,请使用 :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`\ (用于非空间定位音频)或 :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>`/:ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`\ (用于空间定位音频)。声音可以循环播放。
|
||||
|
||||
这个类还可用于存储动态生成的 PCM 音频数据。另请参阅 :ref:`AudioStreamGenerator<class_AudioStreamGenerator>` 以了解程序化音频生成。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -49,8 +56,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -65,8 +72,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_AudioStreamWAV_Format:
|
||||
|
||||
@@ -146,8 +153,8 @@ enum **LoopMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamWAV_property_data:
|
||||
|
||||
@@ -276,8 +283,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_AudioStreamWAV_method_save_to_wav:
|
||||
|
||||
@@ -289,10 +296,10 @@ Method Descriptions
|
||||
|
||||
\ **注意:**\ 如果缺少 ``.wav`` 扩展名,则会自动将其追加到 ``path``\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
BackBufferCopy
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
A node that copies a region of the screen to a buffer for access in shader code.
|
||||
这种节点能够将屏幕中的某个区域复制到缓冲中,方便从着色器代码中访问。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
Node for back-buffering the currently-displayed screen. The region defined in the **BackBufferCopy** node is buffered with the content of the screen it covers, or the entire screen according to the :ref:`copy_mode<class_BackBufferCopy_property_copy_mode>`. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with ``hint_screen_texture``).
|
||||
用于后台缓冲当前显示屏幕的节点。会根据 :ref:`copy_mode<class_BackBufferCopy_property_copy_mode>` 对 **BackBufferCopy** 节点中定义的区域所覆盖的屏幕内容或整个屏幕进行缓冲。可以在着色器脚本中使用屏幕纹理来访问(即带有 ``hint_screen_texture`` 的 uniform 采样器)。
|
||||
|
||||
\ **Note:** Since this node inherits from :ref:`Node2D<class_Node2D>` (and not :ref:`Control<class_Control>`), anchors and margins won't apply to child :ref:`Control<class_Control>`-derived nodes. This can be problematic when resizing the window. To avoid this, add :ref:`Control<class_Control>`-derived nodes as *siblings* to the **BackBufferCopy** node instead of adding them as children.
|
||||
\ **注意:**\ 由于该节点继承自 :ref:`Node2D<class_Node2D>`\ (而非 :ref:`Control<class_Control>`\ ),因此锚点和边距不适用于子 :ref:`Control<class_Control>` 派生节点。这在调整窗口大小时可能会出现问题。为避免这种情况,请将 :ref:`Control<class_Control>` 派生节点添加为 **BackBufferCopy** 节点的\ *同级*\ 节点,而不是将它们添加为子节点。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -43,8 +43,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_BackBufferCopy_CopyMode:
|
||||
|
||||
@@ -82,8 +82,8 @@ enum **CopyMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_BackBufferCopy_property_copy_mode:
|
||||
|
||||
@@ -115,10 +115,10 @@ Property Descriptions
|
||||
|
||||
该 **BackBufferCopy** 所覆盖的区域。只有当 :ref:`copy_mode<class_BackBufferCopy_property_copy_mode>` 为 :ref:`COPY_MODE_RECT<class_BackBufferCopy_constant_COPY_MODE_RECT>` 时才使用。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,23 +10,23 @@
|
||||
BaseButton
|
||||
==========
|
||||
|
||||
**Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`Button<class_Button>`, :ref:`LinkButton<class_LinkButton>`, :ref:`TextureButton<class_TextureButton>`
|
||||
**派生:** :ref:`Button<class_Button>`, :ref:`LinkButton<class_LinkButton>`, :ref:`TextureButton<class_TextureButton>`
|
||||
|
||||
GUI 按钮的抽象基类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**BaseButton** 是 GUI 按钮的抽象基类。本身不显示任何东西。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -57,16 +57,16 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_pressed<class_BaseButton_method__pressed>` **(** **)** |virtual| |
|
||||
| void | :ref:`_pressed<class_BaseButton_private_method__pressed>` **(** **)** |virtual| |
|
||||
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_toggled<class_BaseButton_method__toggled>` **(** :ref:`bool<class_bool>` toggled_on **)** |virtual| |
|
||||
| void | :ref:`_toggled<class_BaseButton_private_method__toggled>` **(** :ref:`bool<class_bool>` toggled_on **)** |virtual| |
|
||||
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`DrawMode<enum_BaseButton_DrawMode>` | :ref:`get_draw_mode<class_BaseButton_method_get_draw_mode>` **(** **)** |const| |
|
||||
+-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -81,8 +81,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Signals
|
||||
-------
|
||||
信号
|
||||
----
|
||||
|
||||
.. _class_BaseButton_signal_button_down:
|
||||
|
||||
@@ -128,7 +128,7 @@ Signals
|
||||
|
||||
**toggled** **(** :ref:`bool<class_bool>` toggled_on **)**
|
||||
|
||||
Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active). The new state is contained in the ``toggled_on`` argument.
|
||||
当按钮刚刚在按下和正常状态之间切换时发出(仅当 :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` 处于活动状态时)。新状态包含在 ``toggled_on`` 参数中。
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -136,8 +136,8 @@ Emitted when the button was just toggled between pressed and normal states (only
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_BaseButton_DrawMode:
|
||||
|
||||
@@ -217,8 +217,8 @@ enum **ActionMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_BaseButton_property_action_mode:
|
||||
|
||||
@@ -400,22 +400,22 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_BaseButton_method__pressed:
|
||||
.. _class_BaseButton_private_method__pressed:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **_pressed** **(** **)** |virtual|
|
||||
|
||||
当按钮被按下时调用。如果你需要知道按钮被按下的状态(并且 :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active]是活动状态),请使用\ :ref:`_toggled<class_BaseButton_method__toggled>`\ 代替。
|
||||
当按钮被按下时调用。如果你需要知道按钮被按下的状态(并且 :ref:`toggle_mode<class_BaseButton_property_toggle_mode>` is active]是活动状态),请使用\ :ref:`_toggled<class_BaseButton_private_method__toggled>`\ 代替。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_BaseButton_method__toggled:
|
||||
.. _class_BaseButton_private_method__toggled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
@@ -461,10 +461,10 @@ void **set_pressed_no_signal** **(** :ref:`bool<class_bool>` pressed **)**
|
||||
|
||||
\ **注意:**\ 该方法不会取消按下 :ref:`button_group<class_BaseButton_property_button_group>` 中的其他按钮。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
BaseMaterial3D
|
||||
==============
|
||||
|
||||
**Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
**Inherited By:** :ref:`ORMMaterial3D<class_ORMMaterial3D>`, :ref:`StandardMaterial3D<class_StandardMaterial3D>`
|
||||
**派生:** :ref:`ORMMaterial3D<class_ORMMaterial3D>`, :ref:`StandardMaterial3D<class_StandardMaterial3D>`
|
||||
|
||||
Abstract base class for defining the 3D rendering properties of meshes.
|
||||
用于定义网格 3D 渲染属性的抽象基类。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
|
||||
这个类提供了默认的材质,具有多种渲染功能和属性,无需编写着色器代码。详情见下面的教程。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`标准 3D 材质与 ORM 3D 材质 <../tutorials/3d/standard_material_3d>`
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -276,8 +276,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -302,8 +302,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
枚举
|
||||
----
|
||||
|
||||
.. _enum_BaseMaterial3D_TextureParam:
|
||||
|
||||
@@ -1101,7 +1101,7 @@ enum **Flags**:
|
||||
|
||||
:ref:`Flags<enum_BaseMaterial3D_Flags>` **FLAG_DISABLE_FOG** = ``21``
|
||||
|
||||
Disables receiving depth-based or volumetric fog.
|
||||
禁用接收基于深度或体积雾。
|
||||
|
||||
.. _class_BaseMaterial3D_constant_FLAG_MAX:
|
||||
|
||||
@@ -1227,7 +1227,7 @@ enum **BillboardMode**:
|
||||
|
||||
:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **BILLBOARD_PARTICLES** = ``3``
|
||||
|
||||
分配给 :ref:`GPUParticles3D<class_GPUParticles3D>` 和 :ref:`CPUParticles3D<class_CPUParticles3D>` 节点时被用于粒子系统。启用 ``particles_anim_*`` 属性。
|
||||
分配给 :ref:`GPUParticles3D<class_GPUParticles3D>` 和 :ref:`CPUParticles3D<class_CPUParticles3D>` 节点时被用于粒子系统(翻页动画)。启用 ``particles_anim_*`` 属性。
|
||||
|
||||
\ :ref:`ParticleProcessMaterial.anim_speed_min<class_ParticleProcessMaterial_property_anim_speed_min>` 或 :ref:`CPUParticles3D.anim_speed_min<class_CPUParticles3D_property_anim_speed_min>` 也应设置为大于零的值,以便播放动画。
|
||||
|
||||
@@ -1355,8 +1355,8 @@ enum **DistanceFadeMode**:
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_BaseMaterial3D_property_albedo_color:
|
||||
|
||||
@@ -2003,7 +2003,7 @@ Alpha 剪刀将丢弃值的阈值。较高的值将导致更多像素被丢弃
|
||||
- void **set_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag, :ref:`bool<class_bool>` enable **)**
|
||||
- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_BaseMaterial3D_Flags>` flag **)** |const|
|
||||
|
||||
If ``true``, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent.
|
||||
如果为 ``true``\ ,则对象不会受到雾的影响(包括体积雾和深度雾)。可用于不着色材质和透明材质(例如例子),不开启时即便完全透明也会受到影响。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -2039,7 +2039,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept
|
||||
|
||||
物体看起来完全不透明的距离。
|
||||
|
||||
\ **注意:**\ 如果 ``distance_fade_max_distance`` 小于 ``distance_fade_min_distance``\ ,则行为相反。物体将在 ``distance_fade_max_distance`` 处开始逐渐消失,并在到达 ``distance_fade_min_distance`` 时完全消失。
|
||||
\ **注意:**\ 如果 :ref:`distance_fade_max_distance<class_BaseMaterial3D_property_distance_fade_max_distance>` 小于 :ref:`distance_fade_min_distance<class_BaseMaterial3D_property_distance_fade_min_distance>`\ ,则行为相反。物体将在 :ref:`distance_fade_max_distance<class_BaseMaterial3D_property_distance_fade_max_distance>` 处开始逐渐消失,并在到达 :ref:`distance_fade_min_distance<class_BaseMaterial3D_property_distance_fade_min_distance>` 时完全消失。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -2058,7 +2058,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept
|
||||
|
||||
物体开始变得可见的距离。如果物体的距离小于这个距离,它将是不可见的。
|
||||
|
||||
\ **注意:**\ 如果 ``distance_fade_min_distance`` 大于 ``distance_fade_max_distance``\ ,则行为将相反。物体将在 ``distance_fade_max_distance`` 处开始逐渐消失,并在到达 ``distance_fade_min_distance`` 时完全消失。
|
||||
\ **注意:**\ 如果 :ref:`distance_fade_min_distance<class_BaseMaterial3D_property_distance_fade_min_distance>` 大于 :ref:`distance_fade_max_distance<class_BaseMaterial3D_property_distance_fade_max_distance>`\ ,则行为将相反。物体将在 :ref:`distance_fade_max_distance<class_BaseMaterial3D_property_distance_fade_max_distance>` 处开始逐渐消失,并在到达 :ref:`distance_fade_min_distance<class_BaseMaterial3D_property_distance_fade_min_distance>` 时完全消失。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -2501,7 +2501,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept
|
||||
- void **set_msdf_outline_size** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_msdf_outline_size** **(** **)**
|
||||
|
||||
The width of the shape outline.
|
||||
形状轮廓的宽度。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -3415,8 +3415,8 @@ The width of the shape outline.
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_BaseMaterial3D_method_get_feature:
|
||||
|
||||
@@ -3486,10 +3486,10 @@ void **set_texture** **(** :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`
|
||||
|
||||
设置由 ``param`` 指定的插槽的纹理。有关可用插槽,请参阅 :ref:`TextureParam<enum_BaseMaterial3D_TextureParam>`\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -14,8 +14,8 @@ Basis
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
用于表示 3D 旋转和缩放的 3×3 矩阵。通常用作 :ref:`Transform3D<class_Transform3D>` 的正交基。
|
||||
|
||||
@@ -27,12 +27,12 @@ Description
|
||||
|
||||
.. note::
|
||||
|
||||
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
|
||||
通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
教程
|
||||
----
|
||||
|
||||
- :doc:`数学文档索引 <../tutorials/math/index>`
|
||||
|
||||
@@ -50,8 +50,8 @@ Tutorials
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -66,8 +66,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Constructors
|
||||
------------
|
||||
构造函数
|
||||
--------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -86,8 +86,8 @@ Constructors
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -107,6 +107,8 @@ Methods
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Basis<class_Basis>` | :ref:`inverse<class_Basis_method_inverse>` **(** **)** |const| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_conformal<class_Basis_method_is_conformal>` **(** **)** |const| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Basis_method_is_equal_approx>` **(** :ref:`Basis<class_Basis>` b **)** |const| |
|
||||
+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_finite<class_Basis_method_is_finite>` **(** **)** |const| |
|
||||
@@ -132,8 +134,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Operators
|
||||
---------
|
||||
操作符
|
||||
------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -160,8 +162,8 @@ Operators
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constants
|
||||
---------
|
||||
常量
|
||||
----
|
||||
|
||||
.. _class_Basis_constant_IDENTITY:
|
||||
|
||||
@@ -171,7 +173,7 @@ Constants
|
||||
|
||||
恒等基,未应用旋转或缩放。
|
||||
|
||||
这与不带任何参数调用 ``Basis()`` 是一样的。这个常量可以用来让你的代码更清晰,并与 C# 保持一致。
|
||||
这与不带任何参数调用 :ref:`Basis<class_Basis_constructor_Basis>` 来创建是一样的。这个常量可以用来让你的代码更清晰,并与 C# 保持一致。
|
||||
|
||||
.. _class_Basis_constant_FLIP_X:
|
||||
|
||||
@@ -203,8 +205,8 @@ Constants
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_Basis_property_x:
|
||||
|
||||
@@ -244,8 +246,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Constructor Descriptions
|
||||
------------------------
|
||||
构造函数说明
|
||||
------------
|
||||
|
||||
.. _class_Basis_constructor_Basis:
|
||||
|
||||
@@ -301,8 +303,8 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Basis_method_determinant:
|
||||
|
||||
@@ -392,6 +394,18 @@ Method Descriptions
|
||||
|
||||
----
|
||||
|
||||
.. _class_Basis_method_is_conformal:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_conformal** **(** **)** |const|
|
||||
|
||||
如果该基是共形的,则返回\ ``true``\ ,这意味着它保留角度和距离比率,并且只能由旋转和均匀缩放组成。如果该基具有不均匀的缩放或剪切/倾斜,则返回 ``false``\ 。这可以用来验证该基是否不失真,这对于物理和其他用例很重要。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Basis_method_is_equal_approx:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
@@ -530,8 +544,8 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Operator Descriptions
|
||||
---------------------
|
||||
操作符说明
|
||||
----------
|
||||
|
||||
.. _class_Basis_operator_neq_Basis:
|
||||
|
||||
@@ -617,10 +631,10 @@ Operator Descriptions
|
||||
|
||||
使用索引访问基的分量。\ ``b[0]`` 相当于 ``b.x``\ 、\ ``b[1]`` 相当于 ``b.y``\ 、\ ``b[2]`` 相当于 ``b.z``\ 。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,21 +10,21 @@
|
||||
BitMap
|
||||
======
|
||||
|
||||
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
布尔矩阵。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
布尔值二维数组,可以用来高效存储二进制矩阵(每个矩阵元素只占一个比特位),并使用自然的笛卡尔坐标查询数值。
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -63,8 +63,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_BitMap_method_convert_to_image:
|
||||
|
||||
@@ -226,10 +226,10 @@ void **set_bitv** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<cla
|
||||
|
||||
将位图中指定位置的元素设置为指定值。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
Bone2D
|
||||
======
|
||||
|
||||
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
与 :ref:`Skeleton2D<class_Skeleton2D>` 一起使用的关节,能够控制并动画其他节点。
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
描述
|
||||
----
|
||||
|
||||
**Bone2D** 层级结构可以绑定到 :ref:`Skeleton2D<class_Skeleton2D>` 上,控制并动画其他 :ref:`Node2D<class_Node2D>` 节点。
|
||||
|
||||
@@ -29,8 +29,8 @@ Description
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
属性
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -41,8 +41,8 @@ Properties
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
方法
|
||||
----
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
@@ -73,8 +73,8 @@ Methods
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
属性说明
|
||||
--------
|
||||
|
||||
.. _class_Bone2D_property_rest:
|
||||
|
||||
@@ -95,8 +95,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
方法说明
|
||||
--------
|
||||
|
||||
.. _class_Bone2D_method_apply_rest:
|
||||
|
||||
@@ -166,7 +166,7 @@ void **apply_rest** **(** **)**
|
||||
|
||||
:ref:`Transform2D<class_Transform2D>` **get_skeleton_rest** **(** **)** |const|
|
||||
|
||||
如果节点没有父节点,返回节点的 :ref:`rest<class_Bone2D_property_rest>` ``Transform2D``\ ,或者返回它相对于父节点的放松姿势。
|
||||
如果节点没有父节点,返回节点的 :ref:`rest<class_Bone2D_property_rest>` :ref:`Transform2D<class_Transform2D>`\ ,或者返回它相对于父节点的放松姿势。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -190,9 +190,9 @@ void **set_autocalculate_length_and_angle** **(** :ref:`bool<class_bool>` auto_c
|
||||
|
||||
void **set_bone_angle** **(** :ref:`float<class_float>` angle **)**
|
||||
|
||||
Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node.
|
||||
设置 **Bone2D** 节点的骨骼角度。这通常设置为从 **Bone2D** 节点到子 **Bone2D** 节点的旋转。
|
||||
|
||||
\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform<class_Node2D_property_transform>`.
|
||||
\ **注意:**\ 这与 **Bone2D** 的旋转不同。骨骼角度是 **Bone2D** 小工具显示的骨骼旋转,不受 **Bone2D** 的 :ref:`Node2D.transform<class_Node2D_property_transform>` 的影响。
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
@@ -206,10 +206,10 @@ void **set_length** **(** :ref:`float<class_float>` length **)**
|
||||
|
||||
设置该 **Bone2D** 中骨骼的长度。
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
||||
.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)`
|
||||
.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
||||
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
||||
.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)`
|
||||
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)`
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user