diff options
Diffstat (limited to 'doc/classes/Node2D.xml')
-rw-r--r-- | doc/classes/Node2D.xml | 89 |
1 files changed, 31 insertions, 58 deletions
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 988fb72267..4f5c2bbd6e 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -12,104 +12,81 @@ </tutorials> <methods> <method name="apply_scale"> - <return type="void"> - </return> - <argument index="0" name="ratio" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="ratio" type="Vector2" /> <description> Multiplies the current scale by the [code]ratio[/code] vector. </description> </method> <method name="get_angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="point" type="Vector2" /> <description> Returns the angle between the node and the [code]point[/code] in radians. + [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url] </description> </method> <method name="get_relative_transform_to_parent" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="parent" type="Node"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="parent" type="Node" /> <description> Returns the [Transform2D] relative to this node's parent. </description> </method> <method name="global_translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector2" /> <description> Adds the [code]offset[/code] vector to the node's global position. </description> </method> <method name="look_at"> - <return type="void"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="Vector2" /> <description> Rotates the node so it points towards the [code]point[/code], which is expected to use global coordinates. </description> </method> <method name="move_local_x"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="scaled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="scaled" type="bool" default="false" /> <description> Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. </description> </method> <method name="move_local_y"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="scaled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="scaled" type="bool" default="false" /> <description> Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. </description> </method> <method name="rotate"> - <return type="void"> - </return> - <argument index="0" name="radians" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="radians" type="float" /> <description> Applies a rotation to the node, in radians, starting from its current rotation. </description> </method> <method name="to_global" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="local_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="local_point" type="Vector2" /> <description> Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position. </description> </method> <method name="to_local" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="global_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="global_point" type="Vector2" /> <description> Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent. </description> </method> <method name="translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector2" /> <description> Translates the node by the given [code]offset[/code] in local coordinates. </description> @@ -122,34 +99,30 @@ <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation"> Global rotation in radians. </member> - <member name="global_rotation_degrees" type="float" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> - Global rotation in degrees. - </member> <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale"> Global scale. </member> <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform"> Global [Transform2D]. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> Position, relative to the node's parent. </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> Rotation in radians, relative to the node's parent. </member> - <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> - Rotation in degrees, relative to the node's parent. - </member> - <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> + <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale. Unscaled value: [code](1, 1)[/code]. </member> <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0"> </member> - <member name="skew_degrees" type="float" setter="set_skew_degrees" getter="get_skew_degrees" default="0.0"> - </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> Local [Transform2D]. </member> + <member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false"> + If [code]true[/code], child nodes with the lowest Y position are drawn before those with a higher Y position. If [code]false[/code], Y-sorting is disabled. Y-sorting only affects children that inherit from [CanvasItem]. + You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree. + </member> <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true"> If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. </member> |