mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Clarify the Line2D, Curve2D/3D documentation and fix parameter names
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
<method name="add_point">
|
||||
<return type="void" />
|
||||
<param index="0" name="position" type="Vector2" />
|
||||
<param index="1" name="at_position" type="int" default="-1" />
|
||||
<param index="1" name="index" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a point at the [param position]. Appends the point at the end of the line.
|
||||
If [param at_position] is given, the point is inserted before the point number [param at_position], moving that point (and every point after) after the inserted point. If [param at_position] is not given, or is an illegal value ([code]at_position < 0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list.
|
||||
Adds a point with the specified [param position] relative to the line's own position. Appends the new point at the end of the point list.
|
||||
If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_points">
|
||||
@@ -29,29 +29,29 @@
|
||||
<method name="get_point_count" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the Line2D's amount of points.
|
||||
Returns the amount of points in the line.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_position" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<param index="0" name="i" type="int" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns point [param i]'s position.
|
||||
Returns the position of the point at index [param index].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_point">
|
||||
<return type="void" />
|
||||
<param index="0" name="i" type="int" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<description>
|
||||
Removes the point at index [param i] from the line.
|
||||
Removes the point at index [param index] from the line.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_position">
|
||||
<return type="void" />
|
||||
<param index="0" name="i" type="int" />
|
||||
<param index="0" name="index" type="int" />
|
||||
<param index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Overwrites the position in point [param i] with the supplied [param position].
|
||||
Overwrites the position of the point at index [param index] with the supplied [param position].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
Reference in New Issue
Block a user