diff options
Diffstat (limited to 'scene/2d/light_occluder_2d.cpp')
-rw-r--r-- | scene/2d/light_occluder_2d.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index a1a8e7d9c4..92e0d8a2f6 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -29,6 +29,8 @@ /*************************************************************************/ #include "light_occluder_2d.h" +#include "engine.h" + void OccluderPolygon2D::set_polygon(const PoolVector<Vector2> &p_polygon) { polygon = p_polygon; @@ -87,9 +89,9 @@ void OccluderPolygon2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "cull_mode", PROPERTY_HINT_ENUM, "Disabled,ClockWise,CounterClockWise"), "set_cull_mode", "get_cull_mode"); ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "polygon"), "set_polygon", "get_polygon"); - BIND_CONSTANT(CULL_DISABLED); - BIND_CONSTANT(CULL_CLOCKWISE); - BIND_CONSTANT(CULL_COUNTER_CLOCKWISE); + BIND_ENUM_CONSTANT(CULL_DISABLED); + BIND_ENUM_CONSTANT(CULL_CLOCKWISE); + BIND_ENUM_CONSTANT(CULL_COUNTER_CLOCKWISE); } OccluderPolygon2D::OccluderPolygon2D() { @@ -130,7 +132,7 @@ void LightOccluder2D::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - if (get_tree()->is_editor_hint()) { + if (Engine::get_singleton()->is_editor_hint()) { if (occluder_polygon.is_valid()) { |