[DOCS] Classref additions and consistency fixes

This commit is contained in:
Chris Bradfield 2018-09-16 10:52:21 -07:00
parent 5961a6da03
commit ec5cc708ce
7 changed files with 41 additions and 23 deletions

View File

@ -27,6 +27,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="get_collision_mask_bit" qualifiers="const"> <method name="get_collision_mask_bit" qualifiers="const">
@ -35,6 +36,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="remove_collision_exception_with"> <method name="remove_collision_exception_with">
@ -54,6 +56,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
<method name="set_collision_mask_bit"> <method name="set_collision_mask_bit">
@ -64,6 +67,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
</methods> </methods>
@ -74,7 +78,7 @@
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member> </member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
The physics layers this area can scan for collisions. The physics layers this area scans for collisions.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -27,7 +27,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Return an individual bit on the collision mask. Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="get_collision_mask_bit" qualifiers="const"> <method name="get_collision_mask_bit" qualifiers="const">
@ -36,7 +36,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Return an individual bit on the collision mask. Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="remove_collision_exception_with"> <method name="remove_collision_exception_with">
@ -56,7 +56,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Set/clear individual bits on the layer mask. This makes getting a body in/out of only one layer easier. Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
<method name="set_collision_mask_bit"> <method name="set_collision_mask_bit">
@ -67,7 +67,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
</methods> </methods>
@ -78,10 +78,10 @@
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member> </member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
The physics layers this area can scan for collisions. The physics layers this area scans for collisions.
</member> </member>
<member name="layers" type="int" setter="_set_layers" getter="_get_layers"> <member name="layers" type="int" setter="_set_layers" getter="_get_layers">
Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layers and collision_mask when modified. Both [member collision_layer] and [member collision_mask]. Returns [member collision_layer] when accessed. Updates [member collision_layer] and [member collision_mask] when modified.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -4,7 +4,7 @@
A script interface to a scene file's data. A script interface to a scene file's data.
</brief_description> </brief_description>
<description> <description>
Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene. Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View File

@ -22,7 +22,7 @@
<argument index="2" name="shape_xform" type="Transform2D"> <argument index="2" name="shape_xform" type="Transform2D">
</argument> </argument>
<description> <description>
Return whether this shape is colliding with another. 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]). 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> </description>
</method> </method>
@ -36,7 +36,7 @@
<argument index="2" name="shape_xform" type="Transform2D"> <argument index="2" name="shape_xform" type="Transform2D">
</argument> </argument>
<description> <description>
Return a list of the points where this shape touches another. If there are no collisions, the list is empty. 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]). 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> </description>
</method> </method>
@ -72,7 +72,7 @@
<argument index="4" name="shape_motion" type="Vector2"> <argument index="4" name="shape_motion" type="Vector2">
</argument> </argument>
<description> <description>
Return 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. 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]). 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> </description>
</method> </method>

View File

@ -16,7 +16,7 @@
<return type="String"> <return type="String">
</return> </return>
<description> <description>
Returns the Shortcut's [InputEvent] as a [String]. Returns the shortcut's [InputEvent] as a [String].
</description> </description>
</method> </method>
<method name="is_shortcut" qualifiers="const"> <method name="is_shortcut" qualifiers="const">
@ -25,20 +25,20 @@
<argument index="0" name="event" type="InputEvent"> <argument index="0" name="event" type="InputEvent">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the Shortcut's [InputEvent] equals [code]event[/code]. Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code].
</description> </description>
</method> </method>
<method name="is_valid" qualifiers="const"> <method name="is_valid" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
If [code]true[/code] this Shortcut is valid. If [code]true[/code] this shortcut is valid.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut"> <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut">
The Shortcut's [InputEvent]. The shortcut's [InputEvent].
Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent]. Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent].
</member> </member>
</members> </members>

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="SoftBody" inherits="MeshInstance" category="Core" version="3.1"> <class name="SoftBody" inherits="MeshInstance" category="Core" version="3.1">
<brief_description> <brief_description>
A soft mesh physics body.
</brief_description> </brief_description>
<description> <description>
A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -15,6 +17,7 @@
<argument index="0" name="body" type="Node"> <argument index="0" name="body" type="Node">
</argument> </argument>
<description> <description>
Adds a body to the list of bodies that this body can't collide with.
</description> </description>
</method> </method>
<method name="get_collision_layer_bit" qualifiers="const"> <method name="get_collision_layer_bit" qualifiers="const">
@ -23,6 +26,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="get_collision_mask_bit" qualifiers="const"> <method name="get_collision_mask_bit" qualifiers="const">
@ -31,6 +35,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns an individual bit on the collision mask.
</description> </description>
</method> </method>
<method name="is_ray_pickable" qualifiers="const"> <method name="is_ray_pickable" qualifiers="const">
@ -45,6 +50,7 @@
<argument index="0" name="body" type="Node"> <argument index="0" name="body" type="Node">
</argument> </argument>
<description> <description>
Removes a body from the list of bodies that this body can't collide with.
</description> </description>
</method> </method>
<method name="set_collision_layer_bit"> <method name="set_collision_layer_bit">
@ -55,6 +61,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
<method name="set_collision_mask_bit"> <method name="set_collision_mask_bit">
@ -65,6 +72,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
</description> </description>
</method> </method>
<method name="set_ray_pickable"> <method name="set_ray_pickable">
@ -80,8 +88,12 @@
<member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness"> <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness">
</member> </member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
The physics layers this area is in.
Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A.
</member> </member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
The physics layers this area scans for collisions.
</member> </member>
<member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient"> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient">
</member> </member>
@ -96,6 +108,7 @@
<member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient"> <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient">
</member> </member>
<member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision"> <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision">
Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
</member> </member>
<member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass"> <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass">
</member> </member>

View File

@ -32,25 +32,26 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Stop (cancel) the Timer. Stops the timer.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="autostart" type="bool" setter="set_autostart" getter="has_autostart"> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart">
If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. If [code]true[/code] the timer will automatically start when entering the scene tree. Default value: [code]false[/code].
</member> </member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot"> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot">
If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. If [code]true[/code] the timer will stop when reaching 0. If [code]false[/code] it will restart. Default value: [code]false[/code].
</member> </member>
<member name="paused" type="bool" setter="set_paused" getter="is_paused"> <member name="paused" type="bool" setter="set_paused" getter="is_paused">
If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. If [code]true[/code] the timer is paused and will not process until it is unpaused again, even if [method start] is called.
</member> </member>
<member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode"> <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode">
Processing mode. Uses TIMER_PROCESS_* constants as value. Processing mode. See [enum TimerProcessMode].
</member> </member>
<member name="time_left" type="float" setter="" getter="get_time_left"> <member name="time_left" type="float" setter="" getter="get_time_left">
The timer's remaining time in seconds. Returns 0 if the timer is inactive. The timer's remaining time in seconds. Returns 0 if the timer is inactive.
Note: You cannot set this value. To change the timer's remaining time, use [member wait_time].
</member> </member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time"> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time">
Wait time in seconds. Wait time in seconds.
@ -59,16 +60,16 @@
<signals> <signals>
<signal name="timeout"> <signal name="timeout">
<description> <description>
Emitted when the Timer reaches 0. Emitted when the timer reaches 0.
</description> </description>
</signal> </signal>
</signals> </signals>
<constants> <constants>
<constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessMode"> <constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessMode">
Update the Timer during the physics step at each frame (fixed framerate processing). Update the timer during the physics step at each frame (fixed framerate processing).
</constant> </constant>
<constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessMode"> <constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessMode">
Update the Timer during the idle time at each frame. Update the timer during the idle time at each frame.
</constant> </constant>
</constants> </constants>
</class> </class>