doc: Sync classref with current source

Handle removal of Pool*Array types and other recent changes.
This commit is contained in:
Rémi Verschelde
2020-02-18 13:59:24 +01:00
parent b4d1882dc3
commit 213a85521d
112 changed files with 495 additions and 509 deletions

View File

@ -8,7 +8,7 @@
Using [method add_outline]:
[codeblock]
var polygon = NavigationPolygon.new()
var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
$NavigationPolygonInstance.navpoly = polygon
@ -16,9 +16,9 @@
Using [method add_polygon] and indices of the vertices array.
[codeblock]
var polygon = NavigationPolygon.new()
var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.set_vertices(vertices)
var indices = PoolIntArray(0, 3, 1)
var indices = PackedIntArray(0, 3, 1)
polygon.add_polygon(indices)
$NavigationPolygonInstance.navpoly = polygon
[/codeblock]
@ -29,27 +29,27 @@
<method name="add_outline">
<return type="void">
</return>
<argument index="0" name="outline" type="PoolVector2Array">
<argument index="0" name="outline" type="PackedVector2Array">
</argument>
<description>
Appends a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_outline_at_index">
<return type="void">
</return>
<argument index="0" name="outline" type="PoolVector2Array">
<argument index="0" name="outline" type="PackedVector2Array">
</argument>
<argument index="1" name="index" type="int">
</argument>
<description>
Adds a [PoolVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use.
</description>
</method>
<method name="add_polygon">
<return type="void">
</return>
<argument index="0" name="polygon" type="PoolIntArray">
<argument index="0" name="polygon" type="PackedIntArray">
</argument>
<description>
Adds a polygon using the indices of the vertices you get when calling [method get_vertices].
@ -70,12 +70,12 @@
</description>
</method>
<method name="get_outline" qualifiers="const">
<return type="PoolVector2Array">
<return type="PackedVector2Array">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns a [PoolVector2Array] containing the vertices of an outline that was created in the editor or by script.
Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script.
</description>
</method>
<method name="get_outline_count" qualifiers="const">
@ -86,12 +86,12 @@
</description>
</method>
<method name="get_polygon">
<return type="PoolIntArray">
<return type="PackedIntArray">
</return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Returns a [PoolIntArray] containing the indices of the vertices of a created polygon.
Returns a [PackedIntArray] containing the indices of the vertices of a created polygon.
</description>
</method>
<method name="get_polygon_count" qualifiers="const">
@ -102,10 +102,10 @@
</description>
</method>
<method name="get_vertices" qualifiers="const">
<return type="PoolVector2Array">
<return type="PackedVector2Array">
</return>
<description>
Returns a [PoolVector2Array] containing all the vertices being used to create the polygons.
Returns a [PackedVector2Array] containing all the vertices being used to create the polygons.
</description>
</method>
<method name="make_polygons_from_outlines">
@ -129,7 +129,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="outline" type="PoolVector2Array">
<argument index="1" name="outline" type="PackedVector2Array">
</argument>
<description>
Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update.
@ -138,7 +138,7 @@
<method name="set_vertices">
<return type="void">
</return>
<argument index="0" name="vertices" type="PoolVector2Array">
<argument index="0" name="vertices" type="PackedVector2Array">
</argument>
<description>
Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method.