Uniformize layer names, script methods and documentation

- Back to 1-based layer names to make it clearer in editor UI
- Layer bit accessors are renamed to layer value and 1-based too
- Uniform errors and documentation in render and physics
- Fix a few remaining collision_layer used in place of collision_mask
This commit is contained in:
PouleyKetchoupp
2021-08-11 16:01:38 -07:00
parent 7188cb6012
commit 989acbbe81
42 changed files with 406 additions and 372 deletions

View File

@ -23,18 +23,18 @@
Returns an array of nodes that were added as collision exceptions for this body.
</description>
</method>
<method name="get_collision_layer_bit" qualifiers="const">
<method name="get_collision_layer_value" qualifiers="const">
<return type="bool" />
<argument index="0" name="bit" type="int" />
<argument index="0" name="layer_number" type="int" />
<description>
Returns an individual bit on the collision mask.
Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
<method name="get_collision_mask_value" qualifiers="const">
<return type="bool" />
<argument index="0" name="bit" type="int" />
<argument index="0" name="layer_number" type="int" />
<description>
Returns an individual bit on the collision mask.
Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
<method name="get_physics_rid" qualifiers="const">
@ -49,20 +49,20 @@
Removes a body from the list of bodies that this body can't collide with.
</description>
</method>
<method name="set_collision_layer_bit">
<method name="set_collision_layer_value">
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="0" name="layer_number" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
<method name="set_collision_mask_bit">
<method name="set_collision_mask_value">
<return type="void" />
<argument index="0" name="bit" type="int" />
<argument index="0" name="layer_number" type="int" />
<argument index="1" name="value" type="bool" />
<description>
Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
</methods>