summaryrefslogtreecommitdiff
path: root/scene/2d/light_occluder_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
-rw-r--r--scene/2d/light_occluder_2d.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index 019eeb9563..d4a5c93823 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -234,7 +234,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->disconnect_compat("changed", this, "_poly_changed");
+ occluder_polygon->disconnect("changed", callable_mp(this, &LightOccluder2D::_poly_changed));
#endif
occluder_polygon = p_polygon;
@@ -245,7 +245,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
#ifdef DEBUG_ENABLED
if (occluder_polygon.is_valid())
- occluder_polygon->connect_compat("changed", this, "_poly_changed");
+ occluder_polygon->connect("changed", callable_mp(this, &LightOccluder2D::_poly_changed));
update();
#endif
}
@@ -287,8 +287,6 @@ void LightOccluder2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_occluder_light_mask", "mask"), &LightOccluder2D::set_occluder_light_mask);
ClassDB::bind_method(D_METHOD("get_occluder_light_mask"), &LightOccluder2D::get_occluder_light_mask);
- ClassDB::bind_method("_poly_changed", &LightOccluder2D::_poly_changed);
-
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "occluder", PROPERTY_HINT_RESOURCE_TYPE, "OccluderPolygon2D"), "set_occluder_polygon", "get_occluder_polygon");
ADD_PROPERTY(PropertyInfo(Variant::INT, "light_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_occluder_light_mask", "get_occluder_light_mask");
}