diff options
Diffstat (limited to 'scene/2d/light_2d.cpp')
-rw-r--r-- | scene/2d/light_2d.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp index 15b638ed92..c03786caef 100644 --- a/scene/2d/light_2d.cpp +++ b/scene/2d/light_2d.cpp @@ -425,6 +425,17 @@ real_t PointLight2D::get_texture_scale() const { return _scale; } +#ifndef DISABLE_DEPRECATED +bool PointLight2D::_set(const StringName &p_name, const Variant &p_value) { + if (p_name == "mode" && p_value.is_num()) { // Compatibility with Godot 3.x. + set_blend_mode((BlendMode)(int)p_value); + return true; + } + + return false; +} +#endif // DISABLE_DEPRECATED + void PointLight2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture", "texture"), &PointLight2D::set_texture); ClassDB::bind_method(D_METHOD("get_texture"), &PointLight2D::get_texture); |