Expose Shape2D::get_rect to scripting
This commit is contained in:
parent
3a59c833f1
commit
247a93845d
2 changed files with 7 additions and 0 deletions
|
@ -66,6 +66,12 @@
|
|||
Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [param color]. The exact drawing method is specific for each shape and cannot be configured.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rect" qualifiers="const">
|
||||
<return type="Rect2" />
|
||||
<description>
|
||||
Returns a [Rect2] representing the shapes boundary.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
|
||||
|
|
|
@ -105,6 +105,7 @@ void Shape2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("collide_and_get_contacts", "local_xform", "with_shape", "shape_xform"), &Shape2D::collide_and_get_contacts);
|
||||
ClassDB::bind_method(D_METHOD("collide_with_motion_and_get_contacts", "local_xform", "local_motion", "with_shape", "shape_xform", "shape_motion"), &Shape2D::collide_with_motion_and_get_contacts);
|
||||
ClassDB::bind_method(D_METHOD("draw", "canvas_item", "color"), &Shape2D::draw);
|
||||
ClassDB::bind_method(D_METHOD("get_rect"), &Shape2D::get_rect);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "custom_solver_bias", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_custom_solver_bias", "get_custom_solver_bias");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue