Returns the last element of the array, or [code]null[/code] if the array is empty.
...
...
@@ -125,6 +127,8 @@
</description>
</method>
<methodname="clear">
<returntype="void">
</return>
<description>
Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
</description>
...
...
@@ -156,6 +160,8 @@
</description>
</method>
<methodname="erase">
<returntype="void">
</return>
<argumentindex="0"name="value"type="Variant">
</argument>
<description>
...
...
@@ -183,7 +189,7 @@
</description>
</method>
<methodname="front">
<returntype="Variant">
<returntype="void">
</return>
<description>
Returns the first element of the array, or [code]null[/code] if the array is empty.
...
...
@@ -212,6 +218,8 @@
</description>
</method>
<methodname="insert">
<returntype="void">
</return>
<argumentindex="0"name="position"type="int">
</argument>
<argumentindex="1"name="value"type="Variant">
...
...
@@ -221,39 +229,43 @@
</description>
</method>
<methodname="invert">
<returntype="void">
</return>
<description>
Reverses the order of the elements in the array.
</description>
</method>
<methodname="max">
<returntype="Variant">
<returntype="void">
</return>
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<methodname="min">
<returntype="Variant">
<returntype="void">
</return>
<description>
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
<methodname="pop_back">
<returntype="Variant">
<returntype="void">
</return>
<description>
Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<methodname="pop_front">
<returntype="Variant">
<returntype="void">
</return>
<description>
Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty.
</description>
</method>
<methodname="push_back">
<returntype="void">
</return>
<argumentindex="0"name="value"type="Variant">
</argument>
<description>
...
...
@@ -261,6 +273,8 @@
</description>
</method>
<methodname="push_front">
<returntype="void">
</return>
<argumentindex="0"name="value"type="Variant">
</argument>
<description>
...
...
@@ -268,6 +282,8 @@
</description>
</method>
<methodname="remove">
<returntype="void">
</return>
<argumentindex="0"name="position"type="int">
</argument>
<description>
...
...
@@ -275,6 +291,8 @@
</description>
</method>
<methodname="resize">
<returntype="void">
</return>
<argumentindex="0"name="size"type="int">
</argument>
<description>
...
...
@@ -293,6 +311,8 @@
</description>
</method>
<methodname="shuffle">
<returntype="void">
</return>
<description>
Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GDScript.randi]. Call [method @GDScript.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling.
</description>
...
...
@@ -320,6 +340,8 @@
</description>
</method>
<methodname="sort">
<returntype="void">
</return>
<description>
Sorts the array.
[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: