summaryrefslogtreecommitdiff
path: root/scene/2d/parallax_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/parallax_layer.cpp')
-rw-r--r--scene/2d/parallax_layer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index 2cda51dccb..a0913ab50c 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -74,7 +74,7 @@ void ParallaxLayer::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
orig_offset=get_pos();
orig_scale=get_scale();
@@ -85,9 +85,9 @@ void ParallaxLayer::_notification(int p_what) {
void ParallaxLayer::set_base_offset_and_scale(const Point2& p_offset,float p_scale) {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
- if (get_scene()->is_editor_hint())
+ if (get_tree()->is_editor_hint())
return;
Point2 new_ofs = ((orig_offset+p_offset)*motion_scale)*p_scale;