mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
481 lines
24 KiB
ReStructuredText
481 lines
24 KiB
ReStructuredText
: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/PackedInt64Array.xml.
|
|
|
|
.. _class_PackedInt64Array:
|
|
|
|
PackedInt64Array
|
|
================
|
|
|
|
64 位整数紧缩数组。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
描述
|
|
----
|
|
|
|
专门设计用于保存 64 位整数值的数组。紧密打包数据,因此可为大型数组节省内存。
|
|
|
|
\ **注意:**\ 该类型存储有符号的 64 位整数,这意味着它可以在区间 ``[-2^63, 2^63 - 1]`` 内取值,即 ``[-9223372036854775808, 9223372036854775807]``\ 。超出这些界限将出现回绕。如果只需要紧密打包 32 位整数,请参阅 :ref:`PackedInt32Array<class_PackedInt32Array>` 以获得更节省内存的替代方案。
|
|
|
|
\ **紧缩数组、类型化数组和非类型化数组之间的差异:**\ 与同类型的类型化数组相比,紧缩数组的迭代和修改速度通常更快(例如 :ref:`PackedInt32Array<class_PackedInt32Array>` 与 ``Array[int]``\ )。此外,紧缩数组消耗的内存更少。缺点是,紧缩数组不太灵活,因为它们不提供许多便利方法,例如 :ref:`Array.map<class_Array_method_map>`\ 。反过来,类型化数组的迭代和修改速度比非类型化数组更快。
|
|
|
|
\ **注意:**\ 紧缩数组始终通过引用传递。要获取可以独立于原始数组进行修改的数组副本,请使用 :ref:`duplicate<class_PackedInt64Array_method_duplicate>`\ 。内置属性和方法并\ *非*\ 如此。这些返回的紧缩数组是副本,更改它\ *不*\ 会影响原始值。要更新内置属性,需要修改返回的数组,然后再次将其分配给该属性。
|
|
|
|
.. note::
|
|
|
|
通过 C# 使用该 API 时会有显著不同,详见 :ref:`doc_c_sharp_differences`\ 。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
构造函数
|
|
--------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ ) |
|
|
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ from\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) |
|
|
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) |
|
|
+-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`append<class_PackedInt64Array_method_append>`\ (\ value\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`append_array<class_PackedInt64Array_method_append_array>`\ (\ array\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`bsearch<class_PackedInt64Array_method_bsearch>`\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`clear<class_PackedInt64Array_method_clear>`\ (\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`count<class_PackedInt64Array_method_count>`\ (\ value\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`duplicate<class_PackedInt64Array_method_duplicate>`\ (\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`fill<class_PackedInt64Array_method_fill>`\ (\ value\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`find<class_PackedInt64Array_method_find>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has<class_PackedInt64Array_method_has>`\ (\ value\: :ref:`int<class_int>`\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`insert<class_PackedInt64Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedInt64Array_method_is_empty>`\ (\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`push_back<class_PackedInt64Array_method_push_back>`\ (\ value\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`remove_at<class_PackedInt64Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`resize<class_PackedInt64Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`reverse<class_PackedInt64Array_method_reverse>`\ (\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`rfind<class_PackedInt64Array_method_rfind>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set<class_PackedInt64Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`size<class_PackedInt64Array_method_size>`\ (\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`slice<class_PackedInt64Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`sort<class_PackedInt64Array_method_sort>`\ (\ ) |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedInt64Array_method_to_byte_array>`\ (\ ) |const| |
|
|
+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
运算符
|
|
------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedInt64Array_operator_neq_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) |
|
|
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`operator +<class_PackedInt64Array_operator_sum_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) |
|
|
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedInt64Array_operator_eq_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) |
|
|
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`operator []<class_PackedInt64Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) |
|
|
+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
构造函数说明
|
|
------------
|
|
|
|
.. _class_PackedInt64Array_constructor_PackedInt64Array:
|
|
|
|
.. rst-class:: classref-constructor
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ ) :ref:`🔗<class_PackedInt64Array_constructor_PackedInt64Array>`
|
|
|
|
构造空的 **PackedInt64Array**\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-constructor
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ from\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ )
|
|
|
|
构造给定 **PackedInt64Array** 的副本。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-constructor
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ from\: :ref:`Array<class_Array>`\ )
|
|
|
|
构造新 **PackedInt64Array**\ 。你还可以传入通用 :ref:`Array<class_Array>` 进行转换。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法说明
|
|
--------
|
|
|
|
.. _class_PackedInt64Array_method_append:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_append>`
|
|
|
|
向数组末尾追加一个元素(\ :ref:`push_back<class_PackedInt64Array_method_push_back>` 的别名)。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_append_array:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **append_array**\ (\ array\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_method_append_array>`
|
|
|
|
在该数组的末尾追加一个 **PackedInt64Array**\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_bsearch:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedInt64Array_method_bsearch>`
|
|
|
|
使用二进法查找已有值的索引(如果该值尚未存在于数组中,则为保持排序顺序的插入索引)。传递 ``before`` 说明符是可选的。如果该参数为 ``false``\ ,则返回的索引位于数组中该值的所有已有的条目之后。
|
|
|
|
\ **注意:**\ 在未排序的数组上调用 :ref:`bsearch<class_PackedInt64Array_method_bsearch>` 会产生预料之外的行为。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_clear:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **clear**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_clear>`
|
|
|
|
清空数组。相当于调用 :ref:`resize<class_PackedInt64Array_method_resize>` 时指定大小为 ``0``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **count**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt64Array_method_count>`
|
|
|
|
返回元素在数组中出现的次数。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_duplicate:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_duplicate>`
|
|
|
|
创建该数组的副本,并将该副本返回。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_fill:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_fill>`
|
|
|
|
将数组中的所有元素都设为给定的值。通常与 :ref:`resize<class_PackedInt64Array_method_resize>` 一起使用,创建给定大小的数组并初始化元素。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_find:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **find**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedInt64Array_method_find>`
|
|
|
|
在数组中搜索值并返回其索引,如果未找到则返回 ``-1`` 。可选地,可以传递起始搜索索引。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_has:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt64Array_method_has>`
|
|
|
|
如果该数组包含 ``value``\ ,则返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_insert:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_insert>`
|
|
|
|
在数组中的给定位置插入新的整数。位置必须有效,或者位于数组末尾(\ ``idx == size()``\ )。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_is_empty:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_is_empty>`
|
|
|
|
该数组为空时,返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_push_back:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_push_back>`
|
|
|
|
将一个值添加到数组中。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_remove_at:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_remove_at>`
|
|
|
|
从数组中删除位于索引的元素。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_resize:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_resize>`
|
|
|
|
设置数组的大小。如果数组被增大,则保留数组末端的元素。如果数组被缩小,则将数组截断到新的大小。调用一次 :ref:`resize<class_PackedInt64Array_method_resize>` 并分配新值比逐个添加新元素要快。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_reverse:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **reverse**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_reverse>`
|
|
|
|
将数组中的元素逆序排列。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_rfind:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedInt64Array_method_rfind>`
|
|
|
|
逆序搜索数组。还可以传递起始搜索位置索引。如果为负,则起始索引被视为相对于数组的结尾。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_set:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_set>`
|
|
|
|
更改给定索引处的整数。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_size:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_size>`
|
|
|
|
返回数组中元素的个数。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_slice:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedInt64Array_method_slice>`
|
|
|
|
返回该 **PackedInt64Array** 的切片,是从 ``begin``\ (含)到 ``end``\ (不含)的全新 **PackedInt64Array**\ 。
|
|
|
|
\ ``begin`` 和 ``end`` 的绝对值会按数组大小进行限制,所以 ``end`` 的默认值会切到数组大小为止(即 ``arr.slice(1)`` 是 ``arr.slice(1, arr.size())`` 的简写)。
|
|
|
|
如果 ``begin`` 或 ``end`` 为负,则表示相对于数组的末尾(即 ``arr.slice(0, -2)`` 是 ``arr.slice(0, arr.size() - 2)`` 的简写)。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_sort:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **sort**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_sort>`
|
|
|
|
将该数组中的元素按升序排列。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_method_to_byte_array:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_to_byte_array>`
|
|
|
|
返回数据的副本,将其中的每个元素都编码为 8 个字节,放入 :ref:`PackedByteArray<class_PackedByteArray>` 中。
|
|
|
|
新数组的大小为 ``int64_array.size() * 8``\ 。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
运算符说明
|
|
----------
|
|
|
|
.. _class_PackedInt64Array_operator_neq_PackedInt64Array:
|
|
|
|
.. rst-class:: classref-operator
|
|
|
|
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_neq_PackedInt64Array>`
|
|
|
|
如果数组内容不同,则返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_operator_sum_PackedInt64Array:
|
|
|
|
.. rst-class:: classref-operator
|
|
|
|
:ref:`PackedInt64Array<class_PackedInt64Array>` **operator +**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_sum_PackedInt64Array>`
|
|
|
|
返回新的 **PackedInt64Array**\ ,新数组的内容为此数组在末尾加上 ``right``\ 。为了提高性能,请考虑改用 :ref:`append_array<class_PackedInt64Array_method_append_array>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_operator_eq_PackedInt64Array:
|
|
|
|
.. rst-class:: classref-operator
|
|
|
|
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_eq_PackedInt64Array>`
|
|
|
|
如果两个数组的内容相同,即对应索引号的整数相等,则返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_PackedInt64Array_operator_idx_int:
|
|
|
|
.. rst-class:: classref-operator
|
|
|
|
:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_operator_idx_int>`
|
|
|
|
返回索引 ``index`` 处的 :ref:`int<class_int>`\ 。负数索引可以用来从末尾开始访问元素。使用越界的数组索引会产生错误。
|
|
|
|
.. |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 (这个值是由下列位标志构成位掩码的整数。)`
|
|
.. |void| replace:: :abbr:`void (无返回值。)`
|