diff options
Diffstat (limited to 'scene/2d/parallax_layer.cpp')
-rw-r--r-- | scene/2d/parallax_layer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 0e83b9aaae..a5a59252a9 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -28,6 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "parallax_layer.h" + +#include "engine.h" #include "parallax_background.h" void ParallaxLayer::set_motion_scale(const Size2 &p_scale) { @@ -111,7 +113,7 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, float p_sc if (!is_inside_tree()) return; - if (get_tree()->is_editor_hint()) + if (Engine::get_singleton()->is_editor_hint()) return; Point2 new_ofs = ((orig_offset + p_offset) * motion_scale) * p_scale + motion_offset; |