Rename LightOccluder2D light_mask to occluder_light_mask

This commit is contained in:
Aaron Franke 2020-12-04 19:32:11 -05:00
parent ce9d87ddfd
commit 1b499d244a
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
2 changed files with 5 additions and 5 deletions

View File

@ -12,12 +12,12 @@
<methods> <methods>
</methods> </methods>
<members> <members>
<member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
</member>
<member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon"> <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon">
The [OccluderPolygon2D] used to compute the shadow. The [OccluderPolygon2D] used to compute the shadow.
</member> </member>
<member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1">
The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
</member>
<member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true"> <member name="sdf_collision" type="bool" setter="set_as_sdf_collision" getter="is_set_as_sdf_collision" default="true">
</member> </member>
</members> </members>

View File

@ -238,7 +238,7 @@ Ref<OccluderPolygon2D> LightOccluder2D::get_occluder_polygon() const {
void LightOccluder2D::set_occluder_light_mask(int p_mask) { void LightOccluder2D::set_occluder_light_mask(int p_mask) {
mask = p_mask; mask = p_mask;
RS::get_singleton()->canvas_light_occluder_set_light_mask(occluder, mask); RS::get_singleton()->canvas_light_occluder_set_light_mask(occluder, p_mask);
} }
int LightOccluder2D::get_occluder_light_mask() const { int LightOccluder2D::get_occluder_light_mask() const {
@ -285,7 +285,7 @@ void LightOccluder2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "occluder", PROPERTY_HINT_RESOURCE_TYPE, "OccluderPolygon2D"), "set_occluder_polygon", "get_occluder_polygon"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "occluder", PROPERTY_HINT_RESOURCE_TYPE, "OccluderPolygon2D"), "set_occluder_polygon", "get_occluder_polygon");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdf_collision"), "set_as_sdf_collision", "is_set_as_sdf_collision"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "sdf_collision"), "set_as_sdf_collision", "is_set_as_sdf_collision");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_occluder_light_mask", "get_occluder_light_mask"); ADD_PROPERTY(PropertyInfo(Variant::INT, "occluder_light_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_occluder_light_mask", "get_occluder_light_mask");
} }
LightOccluder2D::LightOccluder2D() { LightOccluder2D::LightOccluder2D() {