mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
This commit is contained in:
@@ -11,76 +11,53 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="collide">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="local_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="1" name="with_shape" type="Shape2D">
|
||||
</argument>
|
||||
<argument index="2" name="shape_xform" type="Transform2D">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="local_xform" type="Transform2D" />
|
||||
<argument index="1" name="with_shape" type="Shape2D" />
|
||||
<argument index="2" name="shape_xform" type="Transform2D" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this shape is colliding with another.
|
||||
This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="collide_and_get_contacts">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="local_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="1" name="with_shape" type="Shape2D">
|
||||
</argument>
|
||||
<argument index="2" name="shape_xform" type="Transform2D">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="local_xform" type="Transform2D" />
|
||||
<argument index="1" name="with_shape" type="Shape2D" />
|
||||
<argument index="2" name="shape_xform" type="Transform2D" />
|
||||
<description>
|
||||
Returns a list of the points where this shape touches another. If there are no collisions the list is empty.
|
||||
This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="collide_with_motion">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="local_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="1" name="local_motion" type="Vector2">
|
||||
</argument>
|
||||
<argument index="2" name="with_shape" type="Shape2D">
|
||||
</argument>
|
||||
<argument index="3" name="shape_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="4" name="shape_motion" type="Vector2">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="local_xform" type="Transform2D" />
|
||||
<argument index="1" name="local_motion" type="Vector2" />
|
||||
<argument index="2" name="with_shape" type="Shape2D" />
|
||||
<argument index="3" name="shape_xform" type="Transform2D" />
|
||||
<argument index="4" name="shape_motion" type="Vector2" />
|
||||
<description>
|
||||
Returns whether this shape would collide with another, if a given movement was applied.
|
||||
This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="collide_with_motion_and_get_contacts">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="local_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="1" name="local_motion" type="Vector2">
|
||||
</argument>
|
||||
<argument index="2" name="with_shape" type="Shape2D">
|
||||
</argument>
|
||||
<argument index="3" name="shape_xform" type="Transform2D">
|
||||
</argument>
|
||||
<argument index="4" name="shape_motion" type="Vector2">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="local_xform" type="Transform2D" />
|
||||
<argument index="1" name="local_motion" type="Vector2" />
|
||||
<argument index="2" name="with_shape" type="Shape2D" />
|
||||
<argument index="3" name="shape_xform" type="Transform2D" />
|
||||
<argument index="4" name="shape_motion" type="Vector2" />
|
||||
<description>
|
||||
Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty.
|
||||
This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="canvas_item" type="RID">
|
||||
</argument>
|
||||
<argument index="1" name="color" type="Color">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="canvas_item" type="RID" />
|
||||
<argument index="1" name="color" type="Color" />
|
||||
<description>
|
||||
Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured.
|
||||
</description>
|
||||
|
||||
Reference in New Issue
Block a user